Skip to content

Commit

Permalink
Add clarity around using custom guard
Browse files Browse the repository at this point in the history
drbyte authored Oct 18, 2024

Verified

This commit was signed with the committer’s verified signature.
HashEngineering HashEngineering
1 parent 05f620c commit 43bc084
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/basic-usage/blade-directives.md
Original file line number Diff line number Diff line change
@@ -22,6 +22,13 @@ You can use `@can`, `@cannot`, `@canany`, and `@guest` to test for permission-re

When using a permission-name associated with permissions created in this package, you can use `@can('permission-name', 'guard_name')` if you need to check against a specific guard.

Example:
```php
@can('edit articles', 'guard_name')
//
@endcan
```

You can also use `@haspermission('permission-name')` or `@haspermission('permission-name', 'guard_name')` in similar fashion. With corresponding `@endhaspermission`.

There is no `@hasanypermission` directive: use `@canany` instead.

0 comments on commit 43bc084

Please sign in to comment.