over naar uuids, policies, predefined mutations aan kunnen passen
This commit is contained in:
@@ -50,6 +50,10 @@ class Mutation extends Model
|
||||
|
||||
protected static function booted(): void
|
||||
{
|
||||
static::creating(function ($model) {
|
||||
$model->uuid = (string) \Illuminate\Support\Str::uuid();
|
||||
});
|
||||
|
||||
static::created(function (Mutation $mutation) {
|
||||
$mutation->chat()->create([]);
|
||||
|
||||
@@ -87,4 +91,9 @@ class Mutation extends Model
|
||||
broadcast(new \App\Events\MessageSent($dynamicMsg));
|
||||
});
|
||||
}
|
||||
|
||||
public function getRouteKeyName()
|
||||
{
|
||||
return 'uuid';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user