easier to add a 'system_id` column to each table and then use a global scope to filter records
else, read about multi-tenant strategies
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Dear All, As I try to create a system to be share use for my user. the logical as below when user login, they have to put system code like 1000,1001 then after login, all information will be special for their. as it have table tb_account_1000, tb_account_1001
if user login by 1001, then they will always use table tb_account_1001. Question: Any way we can do like this in model?
Please or to participate in this conversation.