How to Accessing Session Data in Laravel ?
Answer / 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 |
What is csrf protection in laravel?
How to use cookies in laravel?
How to install laravel via laravel installer.
List the default ports that are forwarded to your homestead environment?
Can you update homestead?
How to get current route name?
Do you know laravel eloquent?
What do you know about closures in laravel?
How do I seed my database for column that is a foreign key referencing to other table?
How will you describe bundles in laravel?
What are the main features of laravel?
What is facades in laravel?