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

Mohammed-H's avatar

DB Schema

Hello guys, I am building an app with Laravel, and get a bit confused about the DB schema to use. Here is my scenario: The app has different types of clients: Accounts, wholesalers, and Internal Reps. Each type will have several users that will need to login and submit orders. My first thought was to have 3 tables a users table for the internal reps, accounts_users, and wholesaler_users tables for the rest. I need your advice guys and please can you share any best practices for this use case? Thanks

0 likes
7 replies
automica's avatar

@Mohammed-H better to post a blog link or snippet then its easier to scan and comment.

Mohammed-H's avatar

@Snapey Thank you. I think the polymorphic approach is more adapted for my use case.

I will set up the User Model to be shared by other models. That way I can add permissions and roles to control actions.

Thank you guys for all your responses 👍👍

Please or to participate in this conversation.