How to Storing Session Data in Laravel ?

Answers were Sorted based on User's Feedback



How to Storing Session Data in Laravel ?..

Answer / rishabh khanna

Data can be stored in session using the put() method.
The put() method will take two arguments, the “key” and the “value”.

Syntax : $request->session()->put('key', 'value');

Is This Answer Correct ?    0 Yes 0 No

How to Storing Session Data in Laravel ?..

Answer / Shagufta Pravin

To store session data in Laravel, you can use the `session` global variable. For example: `$request->session()->put('key', 'value');`. To retrieve the value, you can use: `$request->session()->get('key')`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

How to check an input value is present or not in laravel?

1 Answers  


How to resolve class instance out of the container in laravel?

1 Answers  


What do you understand by unit testing?

1 Answers  


What are the steps to configure homestead?

1 Answers  


What is routing in laravel?

1 Answers  


Why middleware is used in laravel?

1 Answers  


How to generate a controller with resources in laravel?

1 Answers  


How to use basic routing in laravel?

1 Answers  


How to Assigning Middleware to Route ?

1 Answers  


List the default ports that are forwarded to your homestead environment?

1 Answers  


Does laravel use mvc?

1 Answers  


why we use Laravel - Session ?

2 Answers  


Categories