protected function prepareQuery()
    {
        // relations
        $query = $this->eagerLoadRelations();

        // has relations
        $this->queryHasRelations($query);

        // filters
        $this->queryFilters($query);

        // sort
        $this->querySort($query);

        // limit and offset
        $this->queryLimitOffset($query);

        return $query;
    }