src/Prettus/Repository/Eloquent/BaseRepository.php
public function pushCriteria($criteria)
    {
        if (is_string($criteria)) {
            $criteria = new $criteria;
        }
        if (!$criteria instanceof CriteriaInterface) {
            throw new RepositoryException("Class " . get_class($criteria) . " must be an instance of Prettus\\Repository\\Contracts\\CriteriaInterface");
        }
        $this->criteria->push($criteria);

        return $this;
    }
public function pushCriteria($criteria)
    {
        if (is_string($criteria)) {
            $criteria = new $criteria;
        }
        if (!$criteria instanceof CriteriaInterface) {
            throw new RepositoryException("Class " . get_class($criteria) . " must be an instance of Prettus\\Repository\\Contracts\\CriteriaInterface");
        }
        $this->criteria->push($criteria);

        return $this;
    }
public function pushCriteria ( $ criteria ) { if ( is_string ( $ criteria ) ) { $ criteria = new $ criteria ; } if ( ! $ criteria instanceof CriteriaInterface ) { throw new RepositoryException ( "Class " . get_class ( $ criteria ) . " must be an instance of Prettus\\Repository\\Contracts\\CriteriaInterface" ) ; } $ this -> criteria -> push ( $ criteria ) ; return $ this ; }
Push Criteria for filter the query

@param $criteria

@return $this
@throws \Prettus\Repository\Exceptions\RepositoryException
Push Criteria for filter the query