I would recommend a roles package something like
https://github.com/Zizaco/entrust or https://github.com/spatie/laravel-permission
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Context:
I am building a small marketplace in Laravel for my business and am wondering what would be the recommended approach to handling different application stakeholders. There are 3 types of stakeholders:
Each of the stakeholders is assigned to a particular 'region' - e.g. a manager in Phoenix can see only customers and providers in Phoenix, the manager from Tuscon sees customers and providers in Tuscon etc. All stakeholders should be able to access their respective admin panels/accounts - customers should be able to order services and manage existing bookings, providers should be able to manage their 'jobs' and sign up for new jobs, and managers (admins) should be able to do both (already implemented).
At this point, I only implemented the 'manager' admin panel, which is handled by the default User model. Effectively it means that the marketplace is managed by a manager, but there is no 'self-service' for customers and providers. Customer and providers data is handled by their respective Eloquent models.
Question:
What would be a better way to implement such self-service:
Option 1. Keep the authentication of customers and providers in their current Eloquent models and utilize custom guards. Option 2. Bring customer and provider data to the user model (where managers currently are) and handle the authentication through user roles. Customers and providers would then have a belongsTo relationship with respect to the user table.
Please or to participate in this conversation.