lundi 4 janvier 2016

How to set session in one function and get the session data in another function in laravel 5

This function will get the session value

public function getSession(){
    $value =Session::get('email');
    var_dump($value) ;
}

this function use to set the session values

public function setSession(){
    Session::put('email', 'aaaaaaa.com');

    $value=Session::get('email');
    var_dump($value);

}

routes.php

Route::get('store','Product@setSession');
Route::get('display','Product@getSession');

when type display in url it's show NULL



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JoOMiu
via IFTTT

Aucun commentaire:

Enregistrer un commentaire