I have added 2 more blade directives to improve the usability of @role Blade directive:
@elseifrole as you can guess you can add an elseif statements to @role
@elserole directive which translates to an else.
@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
I have added 2 more blade directives to improve the usability of
@role
Blade directive:@elseifrole
as you can guess you can add anelseif
statements to@role
@elserole
directive which translates to anelse
.Cheers, Sid.