stancl/tenancy

A Laravel multi-database tenancy implementation that respects your code.


README

Laravel 5.8 Latest Stable Version Travis CI build codecov

A Laravel multi-database tenancy package that respects your code.

You won't have to change a thing in your application's code.*

  • ✔️ No model traits to change database connection
  • ✔️ No replacing of Laravel classes (Cache, Storage, ...) with tenancy-aware classes
  • ✔️ Built-in tenant identification based on hostname (including second level domains)

* depending on how you use the filesystem. Everything else will work out of the box.

Documentation

Documentation has been moved to a custom website: https://stancl-tenancy.netlify.com/docs/