hasOne(User::class, 'id', 'user_id'); } /** * Model events */ protected static function boot() { parent::boot(); static::creating(function ($model) { $model->id = (string) Str::uuid(); }); } }