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