vendredi 26 avril 2019

\Request::getSession() returns NULL in Controller construct

I want to get the session id of the user each time a page is loaded so I use \Request::getSession()->getId() in the controller construct but I get this error

Call to a member function getId() on null

If I use same code in any of the route methods, it works.

How can I solve this?



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2IKq2Gu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire