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 |
How to retrive/get current environment in laravel.
What are controllers in laravel?
What is heredoc syntax?
what is meant by Views ?
How to enable query log in laravel?
What is meant by Laravel - Validation ?
What does csrf token in laravel 5?
Can you exclude uris from csrf protection in laravel? Explain
How to create a controller in laravel?
How to retrive current environment in laravel?
How to use update statement in laravel?
Explain the bindings and singletons properties?