user() !== null){ if(Auth()->user()->can('admin.panel.show') == true) return view(config("detector.defaultPath") . "." . $view, $args); } if($view == "users.login" || $view == "users.logout" || $view == "users.forgot" || $view == "users.signup") return view(config("detector.mobilePath") . "." . $view, $args); return view("errors.403", $args); }); } }