lundi 28 novembre 2016

Get a cookie in Laravel 5 middleware

I'm trying to retrieve a cookie from a middleware in Laravel 5.3 but it seems like $request->cookie('language') is empty. I'm guessing that it is only set after the middleware runs.

I read somewhere that I should use \Cookie::queued('language'), but it's still empty.

Is my only option using the $_COOKIE variable?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire