private function query($count)
    {
        $this->applyQueryFilters();

        if ($this->hasTranslating()) {
            $this->applyTranslationFilter();
        }

        if ($this->orderBy()) {
            $this->query = $this->query->orderBy(
                                $this->orderBy(),
                                $this->sortBy()
                            );
        }

        if ($count) {
            return $this->query->count();
        }

        if ($this->perPage > 0) {
            return $this->query->paginate($this->perPage);
        }

        return $this->query->get();
    }
private function query($count)
    {
        $this->applyQueryFilters();

        if ($this->hasTranslating()) {
            $this->applyTranslationFilter();
        }

        if ($this->orderBy()) {
            $this->query = $this->query->orderBy(
                                $this->orderBy(),
                                $this->sortBy()
                            );
        }

        if ($count) {
            return $this->query->count();
        }

        if ($this->perPage > 0) {
            return $this->query->paginate($this->perPage);
        }

        return $this->query->get();
    }
private function query ( $ count ) { $ this -> applyQueryFilters ( ) ; if ( $ this -> hasTranslating ( ) ) { $ this -> applyTranslationFilter ( ) ; } if ( $ this -> orderBy ( ) ) { $ this -> query = $ this -> query -> orderBy ( $ this -> orderBy ( ) , $ this -> sortBy ( ) ) ; } if ( $ count ) { return $ this -> query -> count ( ) ; } if ( $ this -> perPage > 0 ) { return $ this -> query -> paginate ( $ this -> perPage ) ; } return $ this -> query -> get ( ) ; }
Performs the Model Query.

@return \Illuminate\Database\Eloquent\Collection
Performs the Model Query .