Last active
September 20, 2019 21:10
-
-
Save RafahCSilva/5d5bb0402a157f5e32d4d13d88236b17 to your computer and use it in GitHub Desktop.
spatie/laravel-permission PhpStorm Blade directives (edit the file: `.idea/blade.xml`) (ref: https://docs.spatie.be/laravel-permission/v2/advanced-usage/phpstorm/)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="BladeInjectionConfiguration" default="false"> | |
| <directives> | |
| <data directive="@role" injection="true" prefix="<?php if(auth()->check() && auth()->user()->hasRole(" suffix=")): ?>" /> | |
| <data directive="@elserole" injection="true" prefix="<?php elseif(auth()->check() && auth()->user()->hasRole(" suffix=")): ?>" /> | |
| <data directive="@endrole" /> | |
| <data directive="@hasrole" injection="true" prefix="<?php if(auth()->check() && auth()->user()->hasRole(" suffix=")): ?>" /> | |
| <data directive="@endhasrole" /> | |
| <data directive="@hasanyrole" injection="true" prefix="<?php if(auth()->check() && auth()->user()->hasAnyRole(" suffix=")): ?>" /> | |
| <data directive="@endhasanyrole" /> | |
| <data directive="@endhasallroles" /> | |
| <data directive="@hasallroles" injection="true" prefix="<?php if(auth()->check() && auth()->user()->hasAllRoles(" suffix=")): ?>" /> | |
| <data directive="@unlessrole" injection="true" prefix="<?php if(!auth()->check() || ! auth()->user()->hasRole(" suffix=")): ?>" /> | |
| <data directive="@endunlessrole" /> | |
| </directives> | |
| </component> | |
| </project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment