Clean up Transformers and extract an isDeletable() method to models where it makes sense.

This commit is contained in:
Daniel Meltzer
2020-05-23 13:36:02 -04:00
parent 136df9418f
commit f0546bf689
32 changed files with 173 additions and 177 deletions
@@ -49,10 +49,10 @@ class ComponentsTransformer
];
$permissions_array['available_actions'] = [
'checkout' => (bool) Gate::allows('checkout', Component::class),
'checkin' => (bool) Gate::allows('checkin', Component::class),
'update' => (bool) Gate::allows('update', Component::class),
'delete' => (bool) Gate::allows('delete', Component::class),
'checkout' => Gate::allows('checkout', Component::class),
'checkin' => Gate::allows('checkin', Component::class),
'update' => Gate::allows('update', Component::class),
'delete' => Gate::allows('delete', Component::class),
];
$array += $permissions_array;