protected function parseRequest()
    {
        if (request()->limit) {
            if (request()->limit <= 0) {
                throw new InvalidLimitException();
            }
            else if (request()->limit > config("api.maxLimit")) {
                throw new MaxLimitException();
            }
            else {
                $this->limit = request()->limit;
            }
        }
        else {
            $this->limit = config("api.defaultLimit");
        }

        if (request()->offset) {
            $this->offset = request()->offset;
        }
        else {
            $this->offset = 0;
        }

        $this->extractFields();
        $this->extractFilters();
        $this->extractOrdering();
        $this->loadTableName();

        $this->attributes = request()->all();

        return $this;
    }
protected function parseRequest()
    {
        if (request()->limit) {
            if (request()->limit <= 0) {
                throw new InvalidLimitException();
            }
            else if (request()->limit > config("api.maxLimit")) {
                throw new MaxLimitException();
            }
            else {
                $this->limit = request()->limit;
            }
        }
        else {
            $this->limit = config("api.defaultLimit");
        }

        if (request()->offset) {
            $this->offset = request()->offset;
        }
        else {
            $this->offset = 0;
        }

        $this->extractFields();
        $this->extractFilters();
        $this->extractOrdering();
        $this->loadTableName();

        $this->attributes = request()->all();

        return $this;
    }
protected function parseRequest ( ) { if ( request ( ) -> limit ) { if ( request ( ) -> limit <= 0 ) { throw new InvalidLimitException ( ) ; } else if ( request ( ) -> limit > config ( "api.maxLimit" ) ) { throw new MaxLimitException ( ) ; } else { $ this -> limit = request ( ) -> limit ; } } else { $ this -> limit = config ( "api.defaultLimit" ) ; } if ( request ( ) -> offset ) { $ this -> offset = request ( ) -> offset ; } else { $ this -> offset = 0 ; } $ this -> extractFields ( ) ; $ this -> extractFilters ( ) ; $ this -> extractOrdering ( ) ; $ this -> loadTableName ( ) ; $ this -> attributes = request ( ) -> all ( ) ; return $ this ; }
Parse request and fill the parameters
@return $this current controller object for chain method calling
@throws InvalidFilterDefinitionException
@throws InvalidOrderingDefinitionException
@throws MaxLimitException
Parse request and fill the parameters