printing all running session variable in laravel 5.1

63,069

Solution 1

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.

Solution 2

You can also use dd(Session::all());

Share:
63,069
prashant sutail
Author by

prashant sutail

Updated on July 09, 2022

Comments

  • prashant sutail
    prashant sutail almost 2 years

    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)}}