Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sameerast's avatar

PHP Laravel application with Spatie for Roles and Permissions looking for recommodation

This is PHP Laravel application that is used Spatie for roles & permissions and assumes that it is a hosting management tool

The view has four modules like users, clients, hosting package, domain, cost/profit reports Each Module has for files like, create, edit, show single entity, show all entities, delete

There are three user type like Admin, Manager and the client

Roles of each user

Admin - can perform all CRUDS

Manager - can ONLY VIEW all modules other than Cost/Profit module and ONLY HIS CLIENTS

Client(Client is a company, it has a default user and may be few employees from the same company) - can ONLY VIEW permission for specific modules like his details, package info, domain info, and client cant see other client information.

I know it's not a coding help, looking for following from community

Can Spatie handle such a business case?

What are the best practices to follow when such application development?

Is there any documentation, videos, tutorials that are recommended?

0 likes
1 reply
Punksolid's avatar
Level 25

Yes, Spatie'Permission can handle that case of use. There are many ways to accomplish that.

I think the straightforward simplest way to do that is to implement the Access Control Lists views you need to make spatie permission work with your application.

And then in a middleware check if the current user has the rights to do so.

1 like

Please or to participate in this conversation.