Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/medad.corals.io/vendor/spatie/laravel-permission/docs/advanced-usage/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/medad.corals.io/vendor/spatie/laravel-permission/docs/advanced-usage/phpstorm.md
---
title: Extending PhpStorm
weight: 7
---

# Extending PhpStorm to support Blade Directives of this package

1. In PhpStorm, open Preferences, and navigate to **Languages and Frameworks -> PHP -> Blade**
(File | Settings | Languages & Frameworks | PHP | Blade)
2. Uncheck "Use default settings", then click on the `Directives` tab.
3. Add the following new directives for the laravel-permission package:


**role**

- has parameter = YES
- Prefix: `<?php if(auth()->check() && auth()->user()->hasRole(`
- Suffix: `)); ?>`

--

**endrole**

- has parameter = NO
- Prefix: blank
- Suffix: blank

--

**hasrole**

- has parameter = YES
- Prefix: `<?php if(auth()->check() && auth()->user()->hasRole(`
- Suffix: `)); ?>`

--

**endhasrole**

- has parameter = NO
- Prefix: blank
- Suffix: blank

--

**hasanyrole**

- has parameter = YES
- Prefix: `<?php if(auth()->check() && auth()->user()->hasAnyRole(`
- Suffix: `)); ?>`

--

**endhasanyrole**

- has parameter = NO
- Prefix: blank
- Suffix: blank

--

**hasallroles**

- has parameter = YES
- Prefix: `<?php if(auth()->check() && auth()->user()->hasAllRoles(`
- Suffix: `)); ?>`

--

**endhasallroles**

- has parameter = NO
- Prefix: blank
- Suffix: blank

--

**unlessrole**

- has parameter = YES
- Prefix: `<?php if(auth()->check() && !auth()->user()->hasRole(`
- Suffix: `)); ?>`

--

**endunlessrole**

- has parameter = NO
- Prefix: blank
- Suffix: blank

--

Spamworldpro Mini