Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is meant by Attaching Cookies ?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the service container and its advantages.

723


What is meant by Controller Middleware ?

1883


what is meant by Global Middleware and Route Middleware ?

1793


Why we use Laravel - Artisan Console ?

1503


What is monolog library in laravel?

852


How can you display html with blade in laravel?

698


What do you mean by laravel mix?

696


What is routing and how, and what are the different ways to write it?

890


How to install valet?

718


How can we handle Error Handling in Laravel ?

1487


What is reverse path check?

774


What are the Writing Gates and Policies ?

1632


How to get cookies in laravel?

720


Where is the authentication configuration file is located in laravel?

801


How to get Retrieving a Cookie in Laravel ?

1664