mercredi 21 mars 2018

How to Laravel Cookies Override / Overwrite

I am saving referral data into cookies for life time. Is there any option to override that cookies value. Suppose i got a referral link and clicked. That link will be saved in cookies but someone want to use my computer but different referral link. Right now, First cookies will not be override if a values saved new referral link will not effect.

if ( $request->hasCookie('referral') and $request->query('ref') ) {
            return redirect($request->fullUrl())->withCookie(cookie()->forever('referral', $request->query('ref')));
        }



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2IGtNcG
via IFTTT

Aucun commentaire:

Enregistrer un commentaire