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

bor1904's avatar

Best way to manage users divided by roles

Hello, I have some doubt. I'm creating system for rent flats and actors in system are users with two roles (tenants, and landlords). In database I contained all users in one "users" table because their are very similar. But on controller or views level I supose that should be devided ... maybe use dedicated controllers? maybe dedicated methods in the same controller? and what about views ? better way is using "if else" statments to dynamic modyfing common view or mayby better way is create separated views for each role ?

What is your approach ?

thank you

0 likes
1 reply

Please or to participate in this conversation.