HasVersion4Uuids
trait HasVersion4Uuids
Traits
Methods
string
newUniqueId()
Generate a new UUID (version 4) for the model.
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 17
string
newUniqueId()
Generate a new UUID (version 4) for the model.
in
HasUniqueStringIds at line 22
abstract 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.