Cookies
Introduction
Cookies, or browser cookies, are small pieces of data which the web server asks the client's web browser to store. Each request back to the server will include these pieces of data. The data is organized as key/value pairs.
Assign the value
To add a value to an existing key or create it if it does not exist and assign the value to it.
and You can change key name of variable.
Check key
To check if a key exists, it returns true, and if it doesn't, it returns false.
Get value
Get value of key.
You can set a default value when the key is not present.
and you can get all keys using all() method.
Delete keys
You can delete the key using delete() method.
You can delete all the keys use destroy() method.
Last updated