4 months ago


Laravel Example Step 1:

Laravel Example Step 1: Execute the below command to create a controller in which we will manipulate the cookie. php artisan make:controller CookieController --plain Step 2: After successful execution, you will receive the following output: Step 3: Copy the following code in app/Http/Controllers/CookieController.php file. app/Http/Controllers/CookieController.php

Laravel $minutes = 1; $response = new Response('Hello World'); $response->withCookie(cookie('name', 'virat', $minutes)); return $response; } public function getCookie(Request $request){ $value = $request->cookie('name'); echo $value; } } Step 4: Add the following line in app/Http/routes.php file. app/Http/routes.php Route::get('/cookie/set','CookieController@setCookie'); Route::get('/cookie/get','CookieController@getCookie'); Step 5: Visit the following URL to set the cookie. http://localhost:8000/cookie/set Step 6: The output will appear as shown below. The window appearing in the screenshot is taken from firefox but depending on your browser, cookie can also be checked from the cookie option. 49

090-056 Exam BrainDumps are Out - Download and Prepare
Boost Test Library
Real LX0-104 Exam BrainDumps
Rails Conditions - Rails-Konferenz 2009
t T0 - 電気通信大学学術機関リポジトリ C-RECS
The Model View Controller (MVC) - Custom Training Courses ...
blackstar product catalogue single pages 2007 23-03-07:blackstar ...
Pro PHP and jQuery by Jason Lengstorf.pdf - Computer Science ...
Echo ® Brochure - Immucor, Inc.
Order from Australia for Computer Controlled Telephone Exchange
Building Dynamic Websites with MVC