src/Traits/UuidForKey.php
public static function bootUuidForKey()
    {
        static::creating(function ($model) {
            $model->incrementing = false;
            $model->attributes[$model->getKeyName()] = (string) Str::orderedUuid();
        });
    }
public static function bootUuidForKey()
    {
        static::creating(function ($model) {
            $model->incrementing = false;
            $model->attributes[$model->getKeyName()] = (string) Str::orderedUuid();
        });
    }
Hook into the 'creating' method to set the key to be a UUID

@return void