Ad
How To Store Form Data In Cookies OctoberCMS
I have been searching through the docs and can't seem to find an example of how to store cookies. I have a simple form with two inputs that I would like to store the values of when the user returns to the website after a selected amount of time. While the docs are thorough I can seem to find working example of certain thing as in Laravel. Loving this CMS so far, any suggestions would be appreciated.
Ad
Answer
Use the Cookie
service facade to read and write cookies.
https://octobercms.com/docs/services/request-input#cookies
Retrieving a cookie value
$value = Cookie::get('name');
Queue the cookie with the next page response
Cookie::queue($name, $value, $minutes);
Ad
source: stackoverflow.com
Related Questions
- → Can Cookies be securely sent from one machine to another to access a resource
- → Can I store an access Cookie in a Laravel session?
- → How To store form data in cookies OctoberCMS
- → Authentication with JWT
- → Hold Guzzle Cookies across multiple requests
- → How implement 'remember me' in laravel 5.1?
- → Simplest way to add a cookie to Bootstrap's modal?
- → How to get cookie in OctoberCMS
- → Assign Cookie to Variable? Shopify
- → jQuery form submit and disable cookie issue
- → Cookie not being saved in OctoberCMS
- → Store data/<select> on client side
- → Node.js - multiple requests with cookies
Ad