Skip to content
Discussion options

You must be logged in to vote

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');

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@mohsenbostan
Comment options

@erikn69
Comment options

@mohsenbostan
Comment options

@drbyte
Comment options

drbyte Aug 21, 2021
Collaborator

@mohsenbostan
Comment options

Answer selected by drbyte
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
3 participants