src/Model.php
protected function newQuery()
    {
        $query = app("es")->setModel($this);

        $query->connection($this->getConnection());

        if ($index = $this->getIndex()) {
            $query->index($index);
        }

        if ($type = $this->getType()) {
            $query->type($type);
        }

        return $query;
    }
protected function newQuery()
    {
        $query = app("es")->setModel($this);

        $query->connection($this->getConnection());

        if ($index = $this->getIndex()) {
            $query->index($index);
        }

        if ($type = $this->getType()) {
            $query->type($type);
        }

        return $query;
    }
protected function newQuery ( ) { $ query = app ( "es" ) -> setModel ( $ this ) ; $ query -> connection ( $ this -> getConnection ( ) ) ; if ( $ index = $ this -> getIndex ( ) ) { $ query -> index ( $ index ) ; } if ( $ type = $ this -> getType ( ) ) { $ query -> type ( $ type ) ; } return $ query ; }
Create a new model query
@return mixed
Create a new model query