What are cookies? How to get, set, distroy cookies in laravel?



What are cookies? How to get, set, distroy cookies in laravel?..

Answer / Rekha Meena

Cookies are small pieces of data stored on a user's browser by a website. In Laravel, you can use the $request and $response objects to handle cookies. To set a cookie: {"php $response->cookie('myCookie', 'value', $minutes = 60);"}, to get a cookie: {"$cookieValue = $request->cookie('myCookie');"}, and to delete a cookie: {"$response->deleteCookie('myCookie');"}

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Laravel PHP Framework Interview Questions

Exceptions are handled by which class?

1 Answers  


What is observer in laravel?

1 Answers  


What is a caas?

1 Answers  


What is facade and how it is used in laravel?

1 Answers  


What is guarded attribute in a model?

1 Answers  


What are the Versions Laravel - Understanding Release Process ?

2 Answers  


Which class is used to handle exceptions?

1 Answers  


What do you maen by method spoofing in laravel 5?

1 Answers  


What does double quotation mean?

1 Answers  


What is fillable in laravel model?

1 Answers  


How to configure cron jobs in homestead?

1 Answers  


What are the advanced features of laravel 6.0?

1 Answers  


Categories