update logs
This commit is contained in:
@ -149,7 +149,7 @@ class LoginController extends Controller
|
|||||||
"action" => "Login",
|
"action" => "Login",
|
||||||
"desc" => "User login",
|
"desc" => "User login",
|
||||||
];
|
];
|
||||||
UserLogs::insert(Auth::user()->id, "User login");
|
UserLogs::insert(Auth::user()->id, $log);
|
||||||
|
|
||||||
if ($req->wantsJson()) {
|
if ($req->wantsJson()) {
|
||||||
return new JsonResponse([], 204);
|
return new JsonResponse([], 204);
|
||||||
@ -185,7 +185,7 @@ class LoginController extends Controller
|
|||||||
"action" => "Logout",
|
"action" => "Logout",
|
||||||
"desc" => "User logout",
|
"desc" => "User logout",
|
||||||
];
|
];
|
||||||
UserLogs::insert(Auth::user()->id, "User logout");
|
UserLogs::insert(Auth::user()->id, $log);
|
||||||
|
|
||||||
if ($user->role == Users::ROLE_ADMIN) {
|
if ($user->role == Users::ROLE_ADMIN) {
|
||||||
$this->guard()->logout();
|
$this->guard()->logout();
|
||||||
|
|||||||
Reference in New Issue
Block a user