Skip to content

Commit

Permalink
update Gate resource method
Browse files Browse the repository at this point in the history
this goes along with PR laravel#28654
  • Loading branch information
browner12 committed May 30, 2019
1 parent a5b8f74 commit 920d5b8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Illuminate/Auth/Access/Gate.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ public function define($ability, $callback)
public function resource($name, $class, array $abilities = null)
{
$abilities = $abilities ?: [
'view' => 'view',
'create' => 'create',
'update' => 'update',
'delete' => 'delete',
'viewAny' => 'viewAny',
'view' => 'view',
'create' => 'create',
'update' => 'update',
'delete' => 'delete',
];

foreach ($abilities as $ability => $method) {
Expand Down

0 comments on commit 920d5b8

Please sign in to comment.