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 27
void
initializeHasUniqueStringIds()
Initialize the trait.
in
HasUniqueStringIds at line 37
array
uniqueIds()
Get the columns that should receive a unique identifier.
in
HasUniqueStringIds at line 50
Builder|Relation
resolveRouteBindingQuery(Model|Builder|Relation $query, mixed $value, string|null $field = null)
Retrieve the model for a bound value.
in
HasUniqueStringIds at line 66
string
getKeyType()
Get the auto-incrementing key type.
in
HasUniqueStringIds at line 78
bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.
in
HasUniqueStringIds at line 92
protected never
handleInvalidUniqueId(mixed $value, string|null $field)
Throw an exception for the given invalid unique ID.