1
私のサイトは昨夜働いた。しかし、午前中にログインしてログインしようとしましたが、session
の値が別のコントローラに表示されません。リダイレクト後にセッションが自動的に破棄される4.2
はここで、私はこのようなルートを持っている
Route::get('/', array('before' => 'detectLang','uses' => '[email protected]'));
Route::get('{slug}', '[email protected]');
//DesignerController
public function getClient()
{
Session::put('client', 'test'); // after login auth i am putting this
//print_r(Session::get('client')); exit; //this one working here
return Redirect::to('/'); // then redirecting to another controller
}
//ProductController
public function getIndex()
{
print_r(Session::get('client')); exit;
}
私のコードサンプル、
あるしかし、それは何も表示されません。何が問題を引き起こしているのか分かりません。
Laravelは自動的にセッションを開始しますが、これを行う必要はありません。これで問題は解決しません。 – TheFallen