IDはセッション化
このコミットが含まれているのは:
コミット
753b23c206
|
@ -63,6 +63,7 @@ class CommonController extends Controller {
|
|||
|
||||
// セッションを想像する
|
||||
if (Auth::guard($this->values['guard'])->attempt($r->all())) {
|
||||
Session::put('user_id', $get->id);
|
||||
Session::put('guard', $this->values['guard']);
|
||||
Session::put('email', $get->email);
|
||||
Session::save();
|
||||
|
@ -73,7 +74,7 @@ class CommonController extends Controller {
|
|||
|
||||
public function checkLogin () {
|
||||
// セッションがあれば、管理者のトップページに移転する。なければ、ログイン画面となる。
|
||||
if (Session::has('guard') && Session::has('email')) {
|
||||
if (Session::has('user_id') && Session::has('guard') && Session::has('email')) {
|
||||
return redirect(request()->route()->action['prefix'].'/meeting');
|
||||
}
|
||||
|
||||
|
@ -82,6 +83,7 @@ class CommonController extends Controller {
|
|||
|
||||
public function logout () {
|
||||
// セッションを破壊すると、ログイン画面に移転する。
|
||||
Session::forget('user_id');
|
||||
Session::forget('guard');
|
||||
Session::forget('email');
|
||||
|
||||
|
|
新しいイシューから参照