user()) { return $request->expectsJson() ? abort(403) : Redirect::guest(URL::route($redirectToRoute ?: 'verification.notice')); } if ($request->user() instanceof MustVerifyEmail && ! $request->user()->hasVerifiedEmail()) { return $request->expectsJson() ? abort(403, 'Your email address is not verified.') : Redirect::guest(URL::route($redirectToRoute ?: 'verification.notice')); } if ($request->user()->is_active === false) { return $request->expectsJson() ? abort(403, 'User disabled.') : Redirect::guest(URL::route($redirectToRoute ?: 'verification.notice')); } return $next($request); } }