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 do I register a service provider?
Explain closures in laravel?
How to install laravel by composer?
What are enhancement features in laravel 5.8?
What are the three types of authentication?
Explain the difference between laravel and codeigniter?
Where is route in laravel?
How do I log an error?
What is a recursive helper function?
How to check ajax request in laravel?
what is meant by Laravel - Contracts ?
What is slug in laravel?
What is a Laravel - Contracts ?
How to enable maintaince mode in laravel?
How can we turn off csrf protection for a particular route?