resources er uit gesloopt
This commit is contained in:
@@ -105,6 +105,16 @@ class Mutation extends Model
|
||||
});
|
||||
}
|
||||
|
||||
protected $appends = ['can'];
|
||||
|
||||
public function getCanAttribute(): array
|
||||
{
|
||||
return [
|
||||
'update' => auth()->user()?->can('update', $this) ?? false,
|
||||
'void' => auth()->user()?->can('void', $this) ?? false,
|
||||
];
|
||||
}
|
||||
|
||||
public function getRouteKeyName()
|
||||
{
|
||||
return 'uuid';
|
||||
|
||||
Reference in New Issue
Block a user