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 do I make all of my forms bootstrap opinionated?
How facades are different from dependency injection?
What is composer in laravel php?
How to implement you own package in laravel?
Explain the middlewares in laravel?
Explain about laravel project?
What is use of model in laravel?
What is meant by url in internet?
What is a controller middleware?
What is a Views ?
What is a check method ?
Please explain the difference between laravel and codeigniter?
Why use route?
How to list all routes in laravel?
What is the role of service provider?