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 use update query in laravel?
How would you add a 3rd party package like sentry?
Do you know what developed the laravel?
What is mvc framework?
What is binding in laravel?
How do I set up the eloquent relationships between the aforementioned comments and authors, including creating the schema design?
Explain about Form without CSRF token in Laravel ?
What are the Writing Gates and Policies ?
How to use where null and where not null eloquent query in laravel?
Tell me how to get current environment in laravel 5?
What is a Laravel - Contracts ?
Explain what are laravel facades?