Zizaco / entrust

Role-based Permissions for Laravel 5
MIT License
6.05k stars 1.29k forks source link

Added @elseifrole and @elserole Blade directives. #885

Open asdullahsiddique opened 6 years ago

asdullahsiddique commented 6 years ago

I have added 2 more blade directives to improve the usability of @role Blade directive:

@role('admin')
    <p>This is visible to users with the admin role. Gets translated to 
    \Entrust::role('admin')</p>
@elseifrole('staff')
     <p>This is visible to users with the staff role. Gets translated to 
        \Entrust::role('staff')</p>
@elserole
     <p>This is visible to all the other roles./p>
@endrole

Cheers, Sid.

asdullahsiddique commented 6 years ago

Checks were failing because of PHP version in composer.lock but now it's okay. @Zizaco

matteoterzi commented 6 years ago

Great!