Multi-tenancy is a very complex and broad term that may be understood and implemented in various ways, not only in Laravel.
Over the years, people constantly asked questions about it, including Taylor Otwell himself. Here's what he tweeted back in 2021:
The problem is that people have different cases for that multi-tenancy:
So, I compiled my practical knowledge of the typical situations in this course.
Over 6 chapters and 20+ lessons, we will create a few demo applications with various "types" of multi-tenancy.
We will also take a look at packages to help us. The most popular is stancl/tenancy
, but there's also spatie/multi-tenancy
, and what about Laravel Jetstream with teams feature?
I will also try to answer the question of when to use a multi-DB setup and how exactly to implement it with one of the packages.
So, let's dive in?