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(string|Closure $column1, string|null $operator = null, string|Raw|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(string|Closure $column1, string|null $operator = null, string|Raw|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 46
__construct(string|null $type = null, mixed $table = null)

Constructor.

Parameters

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

at line 57
string getType()

Returns the join type.

Return Value

string

at line 67
mixed getTable()

Returns the table name.

Return Value

mixed

at line 77
array getConditions()

Returns ON conditions.

Return Value

array

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

Adds a ON condition to the join.

Parameters

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

Return Value

Join

at line 131
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 144
Join orOn(string|Closure $column1, string|null $operator = null, string|Raw|null $column2 = null)

Adds a OR ON condition to the join.

Parameters

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

Return Value

Join

at line 158
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