user logs update
This commit is contained in:
@ -144,6 +144,11 @@ class LoginController extends Controller
|
||||
// return $req->wantsJson()
|
||||
// ? new JsonResponse([], 204)
|
||||
// : redirect(route('view_dashboard'));
|
||||
$log = [
|
||||
"module" => "Auth",
|
||||
"action" => "Login",
|
||||
"desc" => "User login",
|
||||
];
|
||||
UserLogs::insert(Auth::user()->id, "User login");
|
||||
|
||||
if ($req->wantsJson()) {
|
||||
@ -175,6 +180,11 @@ class LoginController extends Controller
|
||||
public function logout(Request $req)
|
||||
{
|
||||
$user = Auth::user();
|
||||
$log = [
|
||||
"module" => "Auth",
|
||||
"action" => "Logout",
|
||||
"desc" => "User logout",
|
||||
];
|
||||
UserLogs::insert(Auth::user()->id, "User logout");
|
||||
|
||||
if ($user->role == Users::ROLE_ADMIN) {
|
||||
|
||||
Reference in New Issue
Block a user