Courses

Laravel 11 Multi-Tenancy: All You Need To Know

What's Inside The Course

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:

  • Restricting record access by user?
  • Or by teams? Companies? Organizations?
  • What if a user belongs to multiple teams?
  • How to auto-assign a user/team to the record?
  • What if we need a separate database for each team?
  • etc.

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?

avatar

Nice tutorial

👍 3
avatar

I believe there was a series about this topic one or two years ago. As I understand it, there is no longer any video content available for this series. It seems this has happened to many premium courses. Is that correct?

avatar

Yes, you are correct - we are moving away from Video based lessons to text lessons. There is a few reasons for that:

  1. They are easier to maintain and keep up to date.
  2. A lot of people are preferring text based versions already.
  3. As a team, we can cover more topics without the need to spend weeks on editing. Improves our workflow and helps us to deliver higher value.