mirror of
https://gitee.com/koogua/course-tencent-cloud.git
synced 2025-06-23 03:50:56 +08:00
登录后台同时登录前台
This commit is contained in:
parent
9addc3debe
commit
4e80f3938a
@ -8,6 +8,7 @@
|
||||
namespace App\Http\Admin\Services;
|
||||
|
||||
use App\Services\Auth\Admin as AdminAuth;
|
||||
use App\Services\Auth\Home as HomeAuth;
|
||||
use App\Validators\Account as AccountValidator;
|
||||
|
||||
class Session extends Service
|
||||
@ -35,6 +36,8 @@ class Session extends Service
|
||||
|
||||
$this->auth->saveAuthInfo($user);
|
||||
|
||||
$this->loginHome($user);
|
||||
|
||||
$this->eventsManager->fire('Account:afterLogin', $this, $user);
|
||||
}
|
||||
|
||||
@ -47,4 +50,11 @@ class Session extends Service
|
||||
$this->eventsManager->fire('Account:afterLogout', $this, $user);
|
||||
}
|
||||
|
||||
protected function loginHome($user)
|
||||
{
|
||||
$auth = new HomeAuth();
|
||||
|
||||
$auth->saveAuthInfo($user);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user