Set Cookies
------------- public function setCookie(Request $request){
$minutes = 60;
$response = new Response('Set Cookie');
$response->withCookie(cookie('name', 'MyValue', $minutes));
return $response;
}
Get Cookie
------------- public function getCookie(Request $request){
$value = $request->cookie('name');
echo $value;
}
0 Komentar