If you are building a SaaS with Laravel in 2023, you may need multi-tenancy. But first, YAGNI! So let's explore:
- Do you really need multi-tenancy, or can you scope everything to the user?
Okay, you actually ARE going to need multi-tenancy. Now let's consider the following questions:
- Single Database or Multi-Database?
- Implement directly or use a package?
- How can you make jobs, commands, cache, and other standard Laravel features tenant-aware when necessary?
As we discuss these bullets and the many considerations within each, we will be live coding a multi-tenant application. The audience will learn how simple it is to build a multi-tenant application in Laravel no matter which approach you choose!
This will be similar to Tom Schlick's Laracon talk on multi-tenancy in 2017, but will highlight Laravel features and packages that have been added since then. It will also rely heavily on live coding to demonstrate the approaches opposed to slides.
About this talk
My company Padmission is a multi-tenant Laravel app. We launched in 2019 with a direct implementation of single database multi-tenancy. I created a Laracasts series called Multitenancy in Practice detailing this approach and gave a talk at the Laravel Worldwide Meetup as well.
We are rebuilding Padmission from the ground up in 2023 and are evaluating moving to multiple databases and/or moving to a package. This talk will cover all these options how we decided our best path forward.