Multi-Tenant SaaS Apps

Mastering Laravel Multi-Tenancy: Single & Multi-Databases

Build multi-tenant Laravel apps with single or multiple databases, both by hand and with the Tenancy for Laravel package.

Mastering Laravel Multi-Tenancy: Single & Multi-Databases

Who this course is for

  • Laravel developers with a basic to intermediate understanding of Laravel who want to expand their skills by learning multi-tenancy
  • Laravel developers interested in building scalable and efficient applications with multiple tenant support
  • Laravel Developers who want to explore both custom and package-based solutions for multi-tenancy
  • Laravel developers who need to understand the different approaches to multi-tenancy and their implications on application design
  • Developers who are keen to understand how multi-tenancy works in a modern PHP framework like Laravel
  • Laravel developers seeking practical, hands-on experience with real-world multi-tenancy scenarios
  • Professionals looking to stand out as Laravel experts in the industry
  • Anyone eager to elevate their Laravel development skills to new heights

What you'll learn

  • Understanding the fundamentals of multi-tenancy and its benefits
  • Exploring different multi-tenancy approaches (single database vs. multi-database)
  • Understanding the key concepts of multi tenancy like tenant isolation, data separation, and scalability
  • Discovering the best practices for structuring a Laravel project to support multi-tenancy
  • Learn how to organize routes, models, and controllers to handle multiple tenants
  • How to implement tenant identification and isolation within a single database
  • Setting up middleware and service providers to manage tenant-specific data
  • Handling tenant-specific configuration and settings
  • Creating and managing multiple databases for different tenants
  • Dynamically switching database connections based on the tenant
  • Implementing migrations and seeds for tenant-specific databases
  • Installing and configuring the Tenancy for Laravel package
  • Implementing both single and multi-database approaches using the package
  • Managing tenant creation, deletion, and migration with the package's built-in tools

Topics covered

An overview of the main modules. See the course page on Udemy for the full, up-to-date curriculum.

1

Introduction

2

Custom Implementation | Single Database Approach

3

Custom Implementation | Multi Databases Approach

4

Tenancy For Laravel Package Implementation | Multi Databases Approach

5

Tenancy For Laravel Package Implementation | Single Database Approach

6

Finalizing the course

Prerequisites

  • Basic understanding of Laravel is required
  • Basic understanding of models, seeders, migrations and basic CRUD operations is required
  • Knowledge of Laravel's basic features like Eloquent ORM, Blade templating, and middleware
  • Any computer and OS will work — Windows, macOS or Linux

Your instructor

Mahmoud Anwar

Mahmoud Anwar

Senior Laravel/PHP developer and technical educator specializing in backend engineering, with 21+ programming courses created for developers worldwide.

More about Mahmoud
Keep going
Next step

Have a technical challenge?

Tell me about your application, your goals and your constraints. We'll work out the right next step together.