How to get Retrieving a Cookie in Laravel ?
Answer / rajani
Once we set the cookie, we can retrieve the cookie by cookie() method.
This cookie() method will take only one argument which will be the name of the cookie.
The cookie method can be called by using the instance of IlluminateHttpRequest.
Here is a sample code with explanation.
//’name’ is the name of the cookie to retrieve the value of
$value = $request->cookie('name');
Is This Answer Correct ? | 0 Yes | 0 No |
Explain faker in laravel.
What does double quotation mean?
How to add multiple and conditions in laravel query?
What is factory in laravel?
How to use stored procedures in laravel?
What is Named Routes.
What is lts in laravel?
What is the boot method?
Why laravel is the best framework?
In which directory laravel configartion files are kept.
What do you know about php artisan?
How to configure network interfaces in homestead?