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 |
Is any server permissions required for laravel?
How can I hide all stack whoops error information when the application is in production?
How to set database connection in laravel?
How to create migrations in laravel? Explain step by steps.
what is Basic Routing ?
Is laravel easier than php?
Provide the steps to configure laravel application?
How to write php code in laravel blade?
What is crud generator?
What is the difference between {{ $username }} and {!! $Username !!} In laravel?
How to Accessing Session Data in Laravel ?
Explain traits in laravel.