original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Apply criteria in query repository.
  
  @param $model
  @param \Prettus\Repository\Contracts\RepositoryInterface $repository
  
  @return mixed
docstring_tokens: Apply criteria in query repository .