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
What are events in laravel?
what is meant by Global Middleware and Route Middleware ?
What is algolia search?
What is trait in laravel?
How to start, stop mysql on valet?
Explain the difference between laravel and codeigniter?
What is laravel api?
What are guards in laravel?
What is difference between single quote and double quote?
List out some artisan commands?
what is meant by Listeners ?
How to bind a service container to a service provide.
What are view composers?
What is blade laravel?
By default valet serve your app on which tld? How to configure it to use another domain?