trait HasUlids (View source)

Methods

static void
bootHasUlids()

Boot the trait.

string
newUniqueId()

Generate a new ULID for the model.

resolveRouteBindingQuery(Model|Relation $query, mixed $value, string|null $field = null)

Retrieve the model for a bound value.

array
uniqueIds()

Get the columns that should receive a unique identifier.

string
getKeyType()

Get the auto-incrementing key type.

bool
getIncrementing()

Get the value indicating whether the IDs are incrementing.

Details

static void bootHasUlids()

Boot the trait.

Return Value

void

string newUniqueId()

Generate a new ULID for the model.

Return Value

string

Relation resolveRouteBindingQuery(Model|Relation $query, mixed $value, string|null $field = null)

Retrieve the model for a bound value.

Parameters

Model|Relation $query
mixed $value
string|null $field

Return Value

Relation

Exceptions

ModelNotFoundException

array uniqueIds()

Get the columns that should receive a unique identifier.

Return Value

array

string getKeyType()

Get the auto-incrementing key type.

Return Value

string

bool getIncrementing()

Get the value indicating whether the IDs are incrementing.

Return Value

bool

Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.