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 |
How to Create Creating a Cookie in Laravel ?
How do you define middleware?
What is the command to connect vagrant via ssh?
What is chunk in laravel?
Why we use csrf token in laravel?
How do I make a middleware to be run during every http request to an application?
State the difference between codeigniter and laravel.
Explain about laravel project?
How to use joins in laravel?
Explain the request life cycle of laravel?
What is meant by Implicit Controllers
What do you mean by make() method?