Tim Anderson
Tim Anderson

Reputation: 33

Session Variables Laravel

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.

Upvotes: 3

Views: 64

Answers (1)

Emilio Rivas
Emilio Rivas

Reputation: 56

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

Upvotes: 1

Related Questions