Skip to content
Advertisement

Get cookie on function boot ()

Good morning all.

Here I try to get cookies to be able to check if the user has them to be able to recreate a session for him.

But in the boot() I do not get the value of my cookie I get data but I do not know where it comes from!

//admincontroller

JavaScript

//AppProvidersAppServiceProvider.php

JavaScript

Could you help me? Can I put another part than in boot() a global function that is called all the time to check and refresh the session if necessary?

Advertisement

Answer

Hello everyone so here I post the answer for any people it might interest.

So actually I am going through a middleware to check if I have cookies and recreate a session.

The middleware I put in the kernel.php Web route after the others and everything works fine, because every time I call a route it checks that!

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement