Support the ongoing development of Laravel.io →
Authentication
Last updated 2 years ago.
0

Yes, it is possible to accomplish what your asking. However, it depends on what your using for the permissions handler.

Just as an random example, https://github.com/Zizaco/entrust has the option like so:

  • 'middleware' => ['permission:owner', 'permission:writer'] - emulate AND functionality
  • 'middleware' => ['role:admin|root'] - use pipe symbol as OR operator
  • middleware' => ['ability:admin|owner,create-post|edit-user,true'] - complex situations use ability middleware which accepts 3 parameters: roles, permissions, validate_all

Hope that helps.

0

thx. I will check it later :) but i think this is what i needed.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.