HasUniqueStringIds
trait HasUniqueStringIds (View source)
Methods
mixed
newUniqueId()
Generate a new unique key for the model.
bool
isValidUniqueId(mixed $value)
Determine if given key is valid.
void
initializeHasUniqueStringIds()
Initialize the trait.
array
uniqueIds()
Get the columns that should receive a unique identifier.
resolveRouteBindingQuery($query, mixed $value, string|null $field = null)
Retrieve the model for a bound value.
string
getKeyType()
Get the auto-incrementing key type.
bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.
Details
abstract mixed
newUniqueId()
Generate a new unique key for the model.
abstract protected bool
isValidUniqueId(mixed $value)
Determine if given key is valid.
void
initializeHasUniqueStringIds()
Initialize the trait.
array
uniqueIds()
Get the columns that should receive a unique identifier.
Builder
resolveRouteBindingQuery($query, mixed $value, string|null $field = null)
Retrieve the model for a bound value.
string
getKeyType()
Get the auto-incrementing key type.
bool
getIncrementing()
Get the value indicating whether the IDs are incrementing.