Laravel multi-tenancy: Multi database / Introduction

0 complete
20 parts
Next →

1. Introduction

01:36

2. Companies (tenants) and users

04:29

3. Tenant connections

08:16

4. Tenant UUIDs

01:29

5. Listing out companies

04:35

6. Creating tenants

03:19

7. Switching tenants

03:07

8. Tenant identification middleware

06:26

9. Tenant identification event

05:58

10. Request macro

05:27

11. Creating a fresh tenant database

05:29

12. Associating a database connection

06:46

13. Tenant projects

06:59

14. Running tenant database migrations

16:33

15. Scoping tenant migrations

06:38

16. Migrating when a tenant is registered

03:58

17. Rolling back migrations

03:35

18. Seeding tenant databases

08:50

19. Per-tenant caching

13:45

20. Separating the filesystem

16:27

Laravel multi-tenancy: Multi database

  • 2 hours 13 mins
  • Released 7 months ago
Add to favourites

Let's approach multi-database tenancy in Laravel, explore the benefits, work through the complexities, and keep things as simple as possible.

Discussions (9)

Bahaaeddine
1 month ago

which package you are using to handle auto imports ? like you are having a dropdown inside the editor to choose which class to use !!

ROBERT
1 month ago

Why am I getting this error? "Trait 'App\Tenant\Traits\IsTenant' not found"

namespace App;


use App\Tenant\Traits\IsTenant;
use App\Tenant\Models\Tenant;
use Illuminate\Database\Eloquent\Model;



class Compnay extends Model implements Tenant
{
    use IsTenant;
    
    protected $fillable = [
        
        'name'
        
    ];
}
shingi
2 months ago

How does one login as a tenant/user?

Johan
3 months ago

how can i do multi tenancy system with single database but multiples schemas?

Claudio
4 months ago

Hi! I found this tutorial extremely useful and very clear, thanks! Any chance you can add a chapter about the Laravel task scheduling in a multi-tenancy configuration?

fName
4 months ago

Thanks a lot Alex

demayor
5 months ago

Hello , i love this series alot. But can you pls post a project on how to identify the tenants using the subdomain. For example i have a jobs.myWebsite.com , i want it to load jobs subdomain. i know laravel gives room to use subdomains but i dont know how to configure it with the tenancy and also mostly how to configure a server to support it. Thanks.

Rob
5 months ago

Agreed, I was secretly hoping it would be included in this series after watching single database multi-tenancy.

chris
5 months ago

Really found this series helpful.

Would be interested in seeing your approach to adding a payment system but instead of using the user model like cashier put it against the company model.

Thanks for the continued high quality of your tutorials, glad i signed up.

Links

No links for this course

Resources

No resources for this course