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

What is meant by Authorization Mechanism in Laravel ?

1584


Is any server permissions required for laravel?

678


What are the operations perfom while Connecting the Database ?

1636


Explain Constructor Injection ?

1357


What are the software’s included in laravel homestead?

700


What is antiforgerytoken used for?

761


What is method spoofing?

712


what are Important Points contracts in Laravel ?

1388


What are the feature of laravel 5.0?

682


What is eloquent model?

664


How to check table is exists or not in our database using laravel?

683


Explain binding instances?

737


What is meant by Modularity ?

785


What is ssrf attack?

660


Difference between Authentication and Authorization ?

1245