Skip to content

Added @elseifrole and @elserole Blade directives.#885

Open
asdullahsiddique wants to merge 3 commits intoZizaco:masterfrom
asdullahsiddique:master
Open

Added @elseifrole and @elserole Blade directives.#885
asdullahsiddique wants to merge 3 commits intoZizaco:masterfrom
asdullahsiddique:master

Conversation

@asdullahsiddique
Copy link
Copy Markdown

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
Copy Markdown
Author

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

@matteoterzi
Copy link
Copy Markdown

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.

2 participants