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

how to have multiples permissions on blade @shield directive #167

Open
MuriloChianfa opened this issue Jan 1, 2023 · 0 comments
Open

how to have multiples permissions on blade @shield directive #167

MuriloChianfa opened this issue Jan 1, 2023 · 0 comments

Comments

@MuriloChianfa
Copy link

I was needing to have multiples permissions in @shield but from what i readed its not possible.
With wildcard(*) dont work because the name is not standardized.

Example of usage:

@shield(['can-do-that', 'that-can-here'])
    // code...
@endshield

The alternative thats i founded is use vanilla php.

<?php if (app('defender')->canDo('can-do-that') || app('defender')->canDo('that-can-here')) : ?>
    // code...
<?php endif; ?>

Thinks a good ideia do implement that?

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

No branches or pull requests

1 participant