Using conditional middleware #1818
Answered
by
erikn69
mohsenbostan
asked this question in
Q&A
-
Hi, I am trying to use conditional middleware. Would you please tell me how to handle this properly? |
Beta Was this translation helpful? Give feedback.
Answered by
erikn69
Aug 20, 2021
Replies: 1 comment 5 replies
-
maybe https://spatie.be/docs/laravel-permission/v4/basic-usage/super-admin#gatebefore So you can check return $user->is_creator && request()->is('your_route'); |
Beta Was this translation helpful? Give feedback.
5 replies
Answer selected by
drbyte
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
maybe https://spatie.be/docs/laravel-permission/v4/basic-usage/super-admin#gatebefore
So you can check