Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added @elseifrole and @elserole Blade directives. #885

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

asdullahsiddique
Copy link

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

Cheers, Sid.

@asdullahsiddique
Copy link
Author

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

@matteoterzi
Copy link

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants