Laravel Referer Tracking

Posted 2 years ago by tolgayigit

Hello,

I want to make a user referer system in Laravel 5.4. I must use cookie because I must keep referer data minimum 30 days.

I'm giving a referer URL to all users. If some person came to site from one of these URL's, I want to save this referer's id to users table's referer_id's column.

Example referer URL: http://www.example.com?ref_id=10

I looked about cookies in Laravel but I couldn't understand because all of examples were prepared with response() method.

Thanks in advance.

Please sign in or create an account to participate in this conversation.