public function apply($model, \Prettus\Repository\Contracts\RepositoryInterface $repository)
    {
        $limit = $this->request->get('limit', null);
        $offset = $this->request->get('offset', null);

        if ($limit) {
            $model = $model->limit($limit);
        }

        if ($offset && $limit) {
            $model = $model->skip($offset);
        }

        return $model;
    }
public function apply($model, \Prettus\Repository\Contracts\RepositoryInterface $repository)
    {
        $limit = $this->request->get('limit', null);
        $offset = $this->request->get('offset', null);

        if ($limit) {
            $model = $model->limit($limit);
        }

        if ($offset && $limit) {
            $model = $model->skip($offset);
        }

        return $model;
    }
public function apply ( $ model , \ Prettus \ Repository \ Contracts \ RepositoryInterface $ repository ) { $ limit = $ this -> request -> get ( 'limit' , null ) ; $ offset = $ this -> request -> get ( 'offset' , null ) ; if ( $ limit ) { $ model = $ model -> limit ( $ limit ) ; } if ( $ offset && $ limit ) { $ model = $ model -> skip ( $ offset ) ; } return $ model ; }
Apply criteria in query repository.

@param $model
@param \Prettus\Repository\Contracts\RepositoryInterface $repository

@return mixed
Apply criteria in query repository .