Skip to content

Commit

Permalink
Added use sample to AuthorizationException
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Martins committed Aug 30, 2017
1 parent 13fd932 commit 1349e18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,10 @@ class UserController extends Controller
{
// If not found the default response is called
$user = User::findOrFail($id);

// Gate define on AuthServiceProvider
// Generate an AuthorizationException if fail
$this->authorize('users.view', $user->id);
}

```
Expand Down

0 comments on commit 1349e18

Please sign in to comment.