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 are redirect responses?
How to check table is exists or not in our database using laravel?
Explain some benefits of laravel over other php frameworks.
How to use the custom table in laravel model?
what is implementation measures in CSRF Protection ?
How to access laravel project from another computer?
How to make a custom validation rule in laravel?
How to get JSON Response on Laravel ?
What getfacadeaccessor method does?
what is meant by Laravel ?
How can you generate urls?
Tell me what are the official packages provided by laravel?