I am trying to create session like below code but session not working please sussgest me any soluton.
Save
$data = array(
"id" => $row->id,
"name" => $row->name
);
Session($data);
Fetch
Session('id');
I also tried web middleware but till the same session not working
Route::group(['middleware' => ['web']], function ()
{
});