trait Find

Find model

Methods

Model|false
findById(integer|string $id)

Find model by id or uuid

Builder
findMultiple(array $idList)

Find multiole query

Model|null
getLastRow(string $field = 'id')

Get last row

int|null
getLastId()

Get last id

Model|false
findByColumn(mixed $value, string|null|array $column = null)

Find model by column name

object|null
findQuery(mixed $value, string|null|array $column = null)

Return query builder

Builder
findByIdQuery(integer|string $id)

Return query builder

string
getIdAttributeName(integer|string $id)

Return id column name dependiv of id value type for string return uuid

QueryBuilder|false
findItems(array|null $items)

Find collection of models by id or uuid

Builder
whereIgnoreCase(string $attribute, mixed $value, string $operator = '=')

Where case insensitive

Details

at line 23
Model|false findById(integer|string $id)

Find model by id or uuid

Parameters

integer|string $id

Return Value

Model|false

at line 34
Builder findMultiple(array $idList)

Find multiole query

Parameters

array $idList

Return Value

Builder

at line 45
Model|null getLastRow(string $field = 'id')

Get last row

Parameters

string $field

Return Value

Model|null

at line 55
int|null getLastId()

Get last id

Return Value

int|null

at line 69
Model|false findByColumn(mixed $value, string|null|array $column = null)

Find model by column name

Parameters

mixed $value
string|null|array $column

Return Value

Model|false

at line 84
object|null findQuery(mixed $value, string|null|array $column = null)

Return query builder

Parameters

mixed $value
string|null|array $column

Return Value

object|null

at line 111
Builder findByIdQuery(integer|string $id)

Return query builder

Parameters

integer|string $id

Return Value

Builder

at line 122
string getIdAttributeName(integer|string $id)

Return id column name dependiv of id value type for string return uuid

Parameters

integer|string $id

Return Value

string

at line 135
QueryBuilder|false findItems(array|null $items)

Find collection of models by id or uuid

Parameters

array|null $items

Return Value

QueryBuilder|false

at line 148
Builder whereIgnoreCase(string $attribute, mixed $value, string $operator = '=')

Where case insensitive

Parameters

string $attribute
mixed $value
string $operator

Return Value

Builder