public function index($lang = "", $view = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = str_replace("Controller", "", $classNameArr[4]);
        // check if user has permissions to access this link
        $key = ($view == 'list' || $view == '') ? 'read' : $view;
        if(!User::hasAccess($className, $key)) {
            return view('errors.permissions', compact('lang', 'view'));
        }
        return view('content');
    }
public function index($lang = "", $view = "")
    {
        $classNameArr = explode("\\", get_class($this));
        $className = str_replace("Controller", "", $classNameArr[4]);
        // check if user has permissions to access this link
        $key = ($view == 'list' || $view == '') ? 'read' : $view;
        if(!User::hasAccess($className, $key)) {
            return view('errors.permissions', compact('lang', 'view'));
        }
        return view('content');
    }
public function index ( $ lang = "" , $ view = "" ) { $ classNameArr = explode ( "\\" , get_class ( $ this ) ) ; $ className = str_replace ( "Controller" , "" , $ classNameArr [ 4 ] ) ; // check if user has permissions to access this link $ key = ( $ view == 'list' || $ view == '' ) ? 'read' : $ view ; if ( ! User :: hasAccess ( $ className , $ key ) ) { return view ( 'errors.permissions' , compact ( 'lang' , 'view' ) ) ; } return view ( 'content' ) ; }
Returns view with no ID param, like create etc.

@param  string $lang
@param  string $view
@return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
Returns view with no ID param like create etc .