Answer Posted / 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 |
Post New Answer View All Answers
Define laravel guard.
What is routing in laravel 5 and how we can use it?
How to Declaration of namespace ?
How can you reduce memory usage in laravel?
How to Deleting Session Data in Laravel ?
List some features of laravel 5.0?
What is a Terminable Middleware ?
How to set login page as default page in laravel?
How to get requested path in laravel?
Is laravel better than wordpress?
How do I require authentication for a set of routes associated with a subdomain?
Lists the available router methods used in laravel 5?
What is laravel vue?
How do you generate urls?
What is route model binding in laravel?