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
What do you know about csrf token in laravel?
How do I turn off csrf protection?
What is the role of service provider?
How to get current action name in laravel?
Explain automatic injection in laravel?
What is stack channel?
Explain how can you write your own service provider in laravel?
List site types supported by homestead?
What is remember token in laravel?
How to create view Laravel - File Uploading ?
How can I install laravel in windows?
How to create Controller Laravel - File Uploading ?
How to make a custom validation rule in laravel?
How to access session data?
What is bagisto?