Level 6
@mil_ you can use https://spatie.be/docs/laravel-permission/v5/introduction for the role permissions
1 like
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
What is the best practice to secure api endpoints from users that shouldnt have access, right now i am checking if user id have access to resources with sql query in controller is there better practice to do that?
@mil_ Use authorisation to determine what a user can and cannot do.
Please or to participate in this conversation.