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 |
List the software’s included in laravel homestead?
What is meant by Controller Middleware ?
What are enhancement features in laravel 5.8?
What can I do with laravel?
How to get current url in laravel?
What is an api route?
Explain what are laravel facades?
What is laravel quora?
How to redirect user with flashed session data in laravel?
How to generate it on homestead?
Explain how can you write your own service provider in laravel?
Explain laravel’s middleware?