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
How can I hide all stack whoops error information when the application is in production?
Explain request life cycle of laravel.
What is the difference between namespace and use in laravel?
Explain laravel query builder?
What is ssrf attack?
Explain the difference between laravel 4 and laravel 5?
What do you know about traits in laravel?
How to Accessing Session Data in Laravel ?
How can we implement a package in laravel?
What is the use of laravel framework?
Define @include.
How facades are different from dependency injection?
How to start laravel local development server.
What is laravel artisan?
What is csrf protection in laravel?