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 laravel tinker?
Explain loggin in laravel.
Explain request life cycle of laravel.
What are the default ports that are forwarded to your homestead environment?
How can we implement a package in laravel?
How to start valet?
Explain laravel service container?
Does laravel prevent sql injection?
How auth is used?
What is reverse routing?
What is difference between var_dump and print_r?
How to get, set, distroy cookies in laravel?