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
Tell us have you used lumen before?
What is mvc in laravel?
What is the service container in laravel?
Explain how to do 301 redirects in laravel?
What is make method?
How to set login page as default page in laravel?
What are macros in laravel?
Is laravel faster than rails?
What are helper functions in laravel?
Is laravel built on symfony?
Define lumen.
what is meant by Global Middleware and Route Middleware ?
What are redirect responses?
What is eager loading in laravel?
How to use basic routing in laravel?