Skip to main content
Back to packages
4,336 GitHub stars

archtechx/tenancy

View on GitHub

Description

There are two types of multi-tenancy:

  • single-database tenancy — tenants share one database and their data is separated using e.g. where tenant_id = 1 clauses.
  • multi-database tenancy — each tenant has his own database

This package lets you do both, though it focuses more on multi-database tenancy because that type requires more work on the side of the package and less work on your side. Whereas for single-database tenancy you're provided with a class that keeps track of the current tenant and model traits — and the rest is up to you.

Related Content on Laravel Daily

Recent Courses on Laravel Daily

[NEW] Laravel 13 Starter Kit Teams and Customizations

10 lessons
33 min

Laravel 13 Eloquent: Expert Level

41 lessons
1 h 34 min

How to Structure Laravel 13 Projects

16 lessons
1 h 32 min read

We'd Love Your Feedback

Tell us what you like or what we can improve

Feel free to share anything you like or dislike about this page or the platform in general.