Illuminate\Database\Query\Builder::newQuery PHP Method

newQuery() public method

Get a new instance of the query builder.
public newQuery ( ) : Builder
return Builder
    public function newQuery()
    {
        return new static($this->connection, $this->grammar, $this->processor);
    }

Usage Example

コード例 #1
0
 /**
  * Get a new instance of the query builder.
  *
  * @return \Illuminate\Database\Query\Builder
  */
 public function newQuery()
 {
     $query = parent::newQuery();
     return $query->setModel($this->model);
 }