public function makeQuery()
    {
        $query = $this->makeModel()->query();

        if ($this->mediator->hasCriteria()) {
            $query = $this->mediator->criteria()->executeOn($this->makeModel()->query());
        }

        return empty($this->with) ? $query : $query->with($this->with);
    }
public function makeQuery()
    {
        $query = $this->makeModel()->query();

        if ($this->mediator->hasCriteria()) {
            $query = $this->mediator->criteria()->executeOn($this->makeModel()->query());
        }

        return empty($this->with) ? $query : $query->with($this->with);
    }
public function makeQuery ( ) { $ query = $ this -> makeModel ( ) -> query ( ) ; if ( $ this -> mediator -> hasCriteria ( ) ) { $ query = $ this -> mediator -> criteria ( ) -> executeOn ( $ this -> makeModel ( ) -> query ( ) ) ; } return empty ( $ this -> with ) ? $ query : $ query -> with ( $ this -> with ) ; }
Return instance of query builder for Eloquent model.

@return \Illuminate\Database\Eloquent\Builder
Return instance of query builder for Eloquent model .