Laravel 登陆验证

  protected function authenticated(Request $request, $user)
    {
        if (!$user->status) {
            Auth::logout();
            throw ValidationException::withMessages([
                'status' => ['你的账号被禁用'],
            ]);
        }
    }