check() && auth()->user()->banned) { $redirect_to = ""; if(auth()->user()->user_type == 'admin' || auth()->user()->user_type == 'staff'){ $redirect_to = "login"; }else{ $redirect_to = "user.login"; } auth()->logout(); $message = translate("You are banned"); flash($message); return redirect()->route($redirect_to); } return $next($request); } }