Answer Posted / 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 |
Post New Answer View All Answers
How auth is used?
How can we create a record in laravel using eloquent?
List the steps to configure laravel application.
Explain homestead in laravel.
What is blade laravel?
What is database seeding in laravel?
How to get Retrieving the Request URI ?
What is the use of laravel framework?
List some use valet commands?
What encryption does laravel use?
Do you know laravel service container?
When laravel was launched?
How do I make my application serve its content in different languages?
What is validation in laravel and how it is used?
How to get configuration values in laravel?