What is meant by Attaching Cookies ?
Answer / sunil kumar
The withcookie() helper method is used to attach cookies.
The cookie generated with this method can be attached by calling withcookie() method with response instance.
By default, all cookies generated by Laravel are encrypted and signed so that they can't be modified or read by the client.
Example :
Route::get('/cookie',function(){
return response("Hello", 200)->header('Content-Type', 'text/html')
->withcookie('name','Virat Gandhi');
});
| Is This Answer Correct ? | 0 Yes | 0 No |
What is laravel api rate limit?
What is blade in laravel?
What is reverse path multicasting?
What is make method?
Lists the available router methods used in laravel 5?
What is a forget() ?
How do I test sending emails without actually sending emails to real addresses?
What is acl in laravel?
What are advantages of laravel?
How do I disable csrf protection in laravel?
How to Declaration of namespace ?
What is api php in laravel?