public function getQuery()
    {
        // We need to ensure we have at least one filter, as
        // no query results will be returned otherwise.
        if (count(array_filter($this->filters)) === 0) {
            $this->whereHas($this->schema->objectClass());
        }

        return $this->grammar->compile($this);
    }
public function getQuery()
    {
        // We need to ensure we have at least one filter, as
        // no query results will be returned otherwise.
        if (count(array_filter($this->filters)) === 0) {
            $this->whereHas($this->schema->objectClass());
        }

        return $this->grammar->compile($this);
    }
public function getQuery ( ) { // We need to ensure we have at least one filter, as // no query results will be returned otherwise. if ( count ( array_filter ( $ this -> filters ) ) === 0 ) { $ this -> whereHas ( $ this -> schema -> objectClass ( ) ) ; } return $ this -> grammar -> compile ( $ this ) ; }
Compiles and returns the current query string.

@return string
Compiles and returns the current query string .