Skip to content
Advertisement

printing all running session variable in laravel 5.1

How do I print all running session variable in Laravel 5.1?

I want to print all the running session variable. Currently I can retrieve single running session for given value but don’t know the function for print all at one time with one function something like

{{ Session::get(all)}}

Advertisement

Answer

If you just want to see contents of session, try dd():

dd(session()->all());

If not, just use this to get all info:

$data = session()->all();

More on this here.

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