class Join

Table join.

Properties

protected string $type Join type.
protected string $table Table we are joining.
protected array $conditions ON conditions.

Methods

__construct(string|null $type = null, mixed $table = null)

Constructor.

string
getType()

Returns the join type.

mixed
getTable()

Returns the table name.

array
getConditions()

Returns ON conditions.

on(Closure|string $column1, string|null $operator = null, Raw|string|null $column2 = null, string $separator = 'AND')

Adds a ON condition to the join.

onRaw(string $column1, string $operator, string $raw, array $parameters = [], string $separator = 'AND')

Adds a raw ON condition to the join.

orOn(Closure|string $column1, string|null $operator = null, Raw|string|null $column2 = null)

Adds a OR ON condition to the join.

orOnRaw(string $column1, string $operator, string $raw, array $parameters = [])

Adds a raw OR ON condition to the join.

Details

at line 44
__construct(string|null $type = null, mixed $table = null)

Constructor.

Parameters

string|null $type Join type
mixed $table Table we are joining

at line 55
string getType()

Returns the join type.

Return Value

string

at line 65
mixed getTable()

Returns the table name.

Return Value

mixed

at line 75
array getConditions()

Returns ON conditions.

Return Value

array

at line 89
Join on(Closure|string $column1, string|null $operator = null, Raw|string|null $column2 = null, string $separator = 'AND')

Adds a ON condition to the join.

Parameters

Closure|string $column1 Column name
string|null $operator Operator
Raw|string|null $column2 Column name
string $separator Condition separator

Return Value

Join

at line 129
Join onRaw(string $column1, string $operator, string $raw, array $parameters = [], string $separator = 'AND')

Adds a raw ON condition to the join.

Parameters

string $column1 Column name
string $operator Operator
string $raw Raw SQL
array $parameters Parameters
string $separator Condition separator

Return Value

Join

at line 142
Join orOn(Closure|string $column1, string|null $operator = null, Raw|string|null $column2 = null)

Adds a OR ON condition to the join.

Parameters

Closure|string $column1 Column name
string|null $operator Operator
Raw|string|null $column2 Column name

Return Value

Join

at line 156
Join orOnRaw(string $column1, string $operator, string $raw, array $parameters = [])

Adds a raw OR ON condition to the join.

Parameters

string $column1 Column name
string $operator Operator
string $raw Raw SQL
array $parameters Parameters

Return Value

Join