JetStream Fortify check if the user belongs to a specific role or is active while logging in
This guide is helpful. // JetstreamServiceProvider.php Fortify::authenticateUsing(function (Request $request) { $user = User::where('email', $request->email)->whereFileNumber($request->fileNumber)->userActive()->role('Debtor')->first(); if ($user && Hash::check($request->password, $user->password)) { $userLoginDetailObj = new UserLoginDetail(); $userLoginDetailObj->loginDetails($user->id);…
priyankmaniarApril 4, 2021