Skip to content

Commit 43bc084

Browse files
authored
Add clarity around using custom guard
1 parent 05f620c commit 43bc084

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/basic-usage/blade-directives.md

+7
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ You can use `@can`, `@cannot`, `@canany`, and `@guest` to test for permission-re
2222

2323
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.
2424

25+
Example:
26+
```php
27+
@can('edit articles', 'guard_name')
28+
//
29+
@endcan
30+
```
31+
2532
You can also use `@haspermission('permission-name')` or `@haspermission('permission-name', 'guard_name')` in similar fashion. With corresponding `@endhaspermission`.
2633

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

0 commit comments

Comments
 (0)