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