Skip to content

Commit

Permalink
Change document for check permission based on logged in user
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniyal-Javani committed Feb 28, 2020
1 parent 645a372 commit 003e264
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/basic-usage/multiple-guards.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ To check if a user has permission for a specific guard:
$user->hasPermissionTo('publish articles', 'admin');
```

> **Note**: When determining whether a role/permission is valid on a given model, it chooses the guard in this order: first the `$guard_name` property of the model; then the guard in the config (through a provider); then the first-defined guard in the `auth.guards` config array; then the `auth.defaults.guard` config.
> **Note**: When determining whether a role/permission is valid on a given model, it chooses the guard in this order: first the guard of logged in user; then the `$guard_name` property of the model; then the guard in the config (through a provider); then the first-defined guard in the `auth.guards` config array; then the `auth.defaults.guard` config.
> **Note**: When using other than the default `web` guard, you will need to declare which `guard_name` you wish each model to use by setting the `$guard_name` property in your model. One per model is simplest.
Expand Down

0 comments on commit 003e264

Please sign in to comment.