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 install valet?
What are the difference between insert() and insertgetid() in laravel?
How to disable maintaince mode in laravel?
What is antiforgerytoken mvc5?
What is the best way to learn laravel?
What is the difference between forget() and the pull() method ?
What is escaping a string?
What is the difference between namespace and use in laravel?
How to use custom table in laravel modal?
What is a session in laravel?
In laravel, what is fillable attribute in a model?
How to bind a service container to a service provide.