original_string: protected function resolveQueryBuilderFromModel($model)
      {
          if ($this->isEloquentModel($model)) {
              return $model->newQuery();
          } elseif ($this->isEloquentRelationModel($model)) {
              return $model->getQuery();
          } elseif (! $this->isQueryBuilder($model)) {
              throw new InvalidArgumentException('Unable to load Query Builder from $model');
          }
  
          return $model;
      }
code: protected function resolveQueryBuilderFromModel($model)
      {
          if ($this->isEloquentModel($model)) {
              return $model->newQuery();
          } elseif ($this->isEloquentRelationModel($model)) {
              return $model->getQuery();
          } elseif (! $this->isQueryBuilder($model)) {
              throw new InvalidArgumentException('Unable to load Query Builder from $model');
          }
  
          return $model;
      }
code_tokens: protected function resolveQueryBuilderFromModel ( $ model ) { if ( $ this -> isEloquentModel ( $ model ) ) { return $ model -> newQuery ( ) ; } elseif ( $ this -> isEloquentRelationModel ( $ model ) ) { return $ model -> getQuery ( ) ; } elseif ( ! $ this -> isQueryBuilder ( $ model ) ) { throw new InvalidArgumentException ( 'Unable to load Query Builder from $model' ) ; } return $ model ; }
docstring: Resolve query builder from model instance.
  
  @param  mixed  $model
  
  @throws \InvalidArgumentException
  
  @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder
docstring_tokens: Resolve query builder from model instance .