%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/news/vendor/httpoz/roles/docs/
Upload File :
Create Path :
Current File : /var/www/html/news/vendor/httpoz/roles/docs/blade-syntax.md

There are two Blade extensions that are basically a replacement for classic if statements.

``` php
@role('admin') // @if(Auth::check() && Auth::user()->isRole('admin'))
    // user is admin
@endrole

@group('application.managers') // @if(Auth::check() && Auth::user()->group() == 'application.managers')
    // user belongs to 'application.managers' group
@endgroup

@role('admin|moderator', 'all') // @if(Auth::check() && Auth::user()->isRole('admin|moderator', 'all'))
    // user is admin and also moderator
@else
    // something else
@endrole
```

Zerion Mini Shell 1.0