summaryrefslogtreecommitdiff
path: root/vendor/illuminate/database/Query/Builder.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/illuminate/database/Query/Builder.php')
-rwxr-xr-xvendor/illuminate/database/Query/Builder.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/vendor/illuminate/database/Query/Builder.php b/vendor/illuminate/database/Query/Builder.php
index b774afd18e..b8332efe0e 100755
--- a/vendor/illuminate/database/Query/Builder.php
+++ b/vendor/illuminate/database/Query/Builder.php
@@ -382,7 +382,7 @@ class Builder
*/
public function join($table, $first, $operator = null, $second = null, $type = 'inner', $where = false)
{
- $join = new JoinClause($this, $type, $table);
+ $join = $this->newJoinClause($this, $type, $table);
// If the first "column" of the join is really a Closure instance the developer
// is trying to build a join with a complex "on" clause containing more than
@@ -550,12 +550,25 @@ class Builder
return $this->join($table, $first, $operator, $second, 'cross');
}
- $this->joins[] = new JoinClause($this, 'cross', $table);
+ $this->joins[] = $this->newJoinClause($this, 'cross', $table);
return $this;
}
/**
+ * Get a new join clause.
+ *
+ * @param \Illuminate\Database\Query\Builder $parentQuery
+ * @param string $type
+ * @param string $table
+ * @return \Illuminate\Database\Query\JoinClause
+ */
+ protected function newJoinClause(self $parentQuery, $type, $table)
+ {
+ return new JoinClause($parentQuery, $type, $table);
+ }
+
+ /**
* Merge an array of where clauses and bindings.
*
* @param array $wheres