HasUuids

trait HasUuids (View source)

Methods

static void bootHasUuids()

Generate a primary UUID for the model.

string newUniqueId()

Generate a new UUID for the model.

array uniqueIds()

Get the columns that should receive a unique identifier.

Relation resolveRouteBindingQuery(Model|Relation $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

static void bootHasUuids()

Generate a primary UUID for the model.

Return Value

void

string newUniqueId()

Generate a new UUID for the model.

Return Value

string

array uniqueIds()

Get the columns that should receive a unique identifier.

Return Value

array

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

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

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/9.x/Illuminate/Database/Eloquent/Concerns/HasUuids.html