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 |
What is remember token in laravel?
Is any server permissions required for laravel?
What is the command to connect vagrant via ssh?
What is laravel used for?
What is database migration? And how to use it to add insert initial data to database?
What are model factories?
What is a Artisan command ?
What is named route?
What is laravel illuminate?
What is crud generator?
How to get JSON Response on Laravel ?
Explain me active record implementation?