HasUuids
trait HasUuids
Traits
Methods
string
newUniqueId()
Generate a new unique key for the model.
bool
isValidUniqueId(mixed $value)
Determine if given key is valid.
resolveRouteBindingQuery(Model|Builder|Relation $query, mixed $value, string|null $field = null)
Retrieve the model for a bound value.
from
HasUniqueStringIds
bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.
from
HasUniqueStringIds
never
handleInvalidUniqueId(mixed $value, string|null $field)
Throw an exception for the given invalid unique ID.
from
HasUniqueStringIds
Details
at line 16
string
newUniqueId()
Generate a new unique key for the model.
at line 24
protected bool
isValidUniqueId(mixed $value)
Determine if given key is valid.
in
HasUniqueStringIds at line 28
void
initializeHasUniqueStringIds()
Initialize the trait.
in
HasUniqueStringIds at line 38
array
uniqueIds()
Get the columns that should receive a unique identifier.
in
HasUniqueStringIds at line 51
Builder|Relation
resolveRouteBindingQuery(Model|Builder|Relation $query, mixed $value, string|null $field = null)
Retrieve the model for a bound value.
in
HasUniqueStringIds at line 68
string
getKeyType()
Get the auto-incrementing key type.
in
HasUniqueStringIds at line 80
bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.
in
HasUniqueStringIds at line 94
protected never
handleInvalidUniqueId(mixed $value, string|null $field)
Throw an exception for the given invalid unique ID.