Disable company creation #66
Answered
by
andrewdwallo
xBigDaddyx
asked this question in
Q&A
-
I want to disable some employee for creating a company, how to do that? |
Beta Was this translation helpful? Give feedback.
Answered by
andrewdwallo
Jun 16, 2023
Replies: 1 comment 2 replies
-
All you have to do is update this method with your own custom logic inside of the /**
* Determine whether the user can create models.
*/
public function create(User $user): bool
{
return true;
} |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I would suggest using any of these methods or, if you want to, you can use your own custom logic:
An example would look something like this, which would result in NOT allowing any user with the role "editor" to create a company: