Answered by : tough-tapir-5290s8m5b1ys
Session::put('key', 'value');
session(['key' => 'value']);
Source : https://laravel.com/docs/5.0/session | Last Update : Thu, 01 Oct 20
Answered by : muhammad-ishaq
//set session
Session::put('sessionName', 'message');
//get session
Session::get('sessionName');
//don't forget to use "use Illuminate\Support\Facades\Session;"
Source : | Last Update : Sun, 27 Mar 22
Answered by : horrible-hawk-m2bt7xhtzxkf
$value = Session::get('variableSetOnPageA');
Source : https://stackoverflow.com/questions/47986401/accessing-session-data-in-controllerlaravel | Last Update : Thu, 03 Dec 20
Answered by : cheerful-cheetah-4qsmq1qo1m4r
$request->session()->put('key','value');
Source : https://www.w3adda.com/laravel-tutorial/laravel-session | Last Update : Sat, 25 Apr 20
Answered by : alberto-peripolli
$data = $request->session()->all();
Source : https://laravel.com/docs/7.x/session#retrieving-data | Last Update : Sat, 01 Aug 20
Answered by : adams-paul
Session::put('variableName', $value);
Source : https://stackoverflow.com/questions/37292167/php-laravel-how-to-set-or-get-session-data | Last Update : Sat, 20 Feb 21
Answered by : selfish-seahorse-6j72603p73uk
$value = Session::get('key');
$value = session('key');
Source : https://laravel.com/docs/5.0/session#session-usage | Last Update : Wed, 14 Apr 21
Answered by : bloody-batfish-hs3zou31rcbc
// Via a request instance...
$request->session()->put('key', 'value');
// Via the global "session" helper...
session(['key' => 'value']);
Source : https://laravel.com/docs/8.x/session#storing-data | Last Update : Sat, 21 Aug 21
Answered by : muhammad-hamza-udaqv7gwqy6p
Session::put('key', 'value');
session(['key' => 'value']);
Source : https://laravel.com/docs/5.0/session | Last Update : Wed, 16 Mar 22
Answered by : irfan-majid
php artisan session:table
Source : | Last Update : Sun, 05 Jun 22