JoinClause
class JoinClause (View source)
Properties
string | $type | The type of join being performed. | |
string | $table | The table the join clause is joining to. | |
array | $clauses | The "on" clauses for the join. | |
array | $bindings | The "on" bindings for the join. |
Methods
Create a new join clause instance.
Add an "on where is null" clause to the join.
Add an "or on where is null" clause to the join.
Add an "on where is not null" clause to the join.
Add an "or on where is not null" clause to the join.
Add an "on where in (.
Add an "on where not in (.
Add an "or on where in (.
Add an "or on where not in (.
Details
at line line 72
$this
on(
Closure|string $first,
string|null $operator = null,
string|null $second = null,
string $boolean = 'and',
bool $where = false)
Add an "on" clause to the join.
On clauses can be chained, e.g.
$join->on('contacts.userid', '=', 'users.id') ->on('contacts.infoid', '=', 'info.id')
will produce the following SQL:
on contacts
.user_id
= users
.id
and contacts
.info_id
= info
.id
at line line 105
JoinClause
orOn(
Closure|string $first,
string|null $operator = null,
string|null $second = null)
Add an "or on" clause to the join.
at line line 119
JoinClause
where(
Closure|string $first,
string|null $operator = null,
string|null $second = null,
string $boolean = 'and')
Add an "on where" clause to the join.
at line line 132
JoinClause
orWhere(
Closure|string $first,
string|null $operator = null,
string|null $second = null)
Add an "or on where" clause to the join.
at line line 144
JoinClause
whereNull(
string $column,
string $boolean = 'and')
Add an "on where is null" clause to the join.
at line line 155
JoinClause
orWhereNull(
string $column)
Add an "or on where is null" clause to the join.
at line line 167
JoinClause
whereNotNull(
string $column,
string $boolean = 'and')
Add an "on where is not null" clause to the join.
at line line 178
JoinClause
orWhereNotNull(
string $column)
Add an "or on where is not null" clause to the join.
at line line 190
JoinClause
whereIn(
string $column,
array $values)
Add an "on where in (.
..)" clause to the join.
at line line 202
JoinClause
whereNotIn(
string $column,
array $values)
Add an "on where not in (.
..)" clause to the join.
at line line 214
JoinClause
orWhereIn(
string $column,
array $values)
Add an "or on where in (.
..)" clause to the join.
at line line 226
JoinClause
orWhereNotIn(
string $column,
array $values)
Add an "or on where not in (.
..)" clause to the join.
at line line 238
JoinClause
nest(
Closure $callback,
string $boolean = 'and')
Add a nested where statement to the query.