Closed louiscoetzee closed 3 years ago
Thank you @louiscoetzee for the good question, you can simply add that 'company_id' field to 'attributes' table, then add eloquent scope to filter the query https://laravel.com/docs/8.x/eloquent
It's simple. Also you may check our multi-tenant solution here (which uses similar but different approach than yours) https://github.com/rinvex/laravel-tenants
Hi, thanks for sharing this. I am interested in using this package in an app where we have multiple companies/tenants. How could I go about storing model attributes for each company. So each company can choose to add custom fields to for example Contact model. I am using company_id field to check the company scope on tables. Thanks.