How to Accessing Session Data in Laravel ?
Answer / amit khanna
To access the session data, we need an instance of session which can be accessed via HTTP request.
After getting the instance, we can use the get() method, which will take one argument, key, to get the session data.
Syntax : $value = $request->session()->get('key');
You can use all() method to get all session data instead of get() method.
Is This Answer Correct ? | 0 Yes | 0 No |
Which class is used to handle exceptions?
How do I start laravel in ubuntu?
How to get, set cookies in laravel?
How to do 301 redirects in laravel?
How to share sites with external world on valet?
How to serve sites with tls on valet?
What is laravel orm?
What do you know about closures in laravel?
What is contextual binding?
Command to connect vagrant via ssh?
What is the laravel?
Is react a library or a framework?