Session Variables Laravel

Viewed 52

I am new in working with Laravel, currently I am working with sessions. I got a bit confused with the syntax on how to save session variables. ¿Could you help me?

Thank you for your help.

1 Answers

To add global variables all you have to do is

session()->regenerate();

session()->put('name', $value);

and that should add it to your session variables

Related