Tuesday, 9 February 2021

How to create and destroy cookie

Set cookie: Cookie::queue(Cookie::make('cookieName', 'value', $minutes));

Get cookie: $value = $request->cookie('cookieName'); or $value = Cookie::get('cookieName');

Forget/remove cookie: Cookie::queue(Cookie::forget('cookieName'));

Check if cookie exist: Cookie::has('cookiename'); or $request->hasCookie('cookiename') will return true or false

No comments:

Post a Comment

Machine Learning - Potato Leaf Disease Prediction

Step 1: import numpy as np import pandas as pd import splitfolders import matplotlib.pyplot as plt import tensorflow as tf from tensorflow i...