Category: Laravel

Multi-tenancy is pretty common in web-projects – when you want to give records access only for users who created those records.
This article will show you how to implement it in the most simple way, in single database.
What We’re Creating HereImagine a web-project to manage Books, and every user may see only their own entered books.
But also every book has origin country field from Country model, and that model needs to be accessible to everyone, without multi-tenancy.
In general, the rule is simple: for those models that you want to be “multi-tenantable”, use the trait.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners