tenancyforlaravel.com Open in urlscan Pro
2604:a880:400:d0::1b6b:7001  Public Scan

Submitted URL: http://tenancyforlaravel.com/
Effective URL: https://tenancyforlaravel.com/
Submission: On October 30 via manual from US — Scanned from DE

Form analysis 2 forms found in the DOM

POST https://github.us3.list-manage.com/subscribe/post?u=6a33c422777aedd88e9a9488e&id=9b99f013b8

<form action="https://github.us3.list-manage.com/subscribe/post?u=6a33c422777aedd88e9a9488e&amp;id=9b99f013b8" method="post" target="_blank" class="justify-center mt-8 sm:flex">
  <input aria-label="Email address" name="EMAIL" type="email" required=""
    class="w-full px-5 py-3 text-base leading-6 text-gray-900 placeholder-gray-500 transition duration-150 ease-in-out bg-white border border-gray-300 rounded-md appearance-none focus:outline-none focus:shadow-outline focus:border-blue-300 sm:max-w-xs"
    placeholder="Enter your email">
  <input type="hidden" value="8" name="group[27425][8]" id="mce-group[27425]-27425-3">
  <div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0">
    <button
      class="flex items-center justify-center w-full px-5 py-3 text-base font-medium leading-6 text-white transition duration-150 ease-in-out bg-indigo-600 border border-transparent rounded-md hover:bg-indigo-500 focus:outline-none focus:shadow-outline">
      Notify me </button>
  </div>
</form>

POST https://github.us3.list-manage.com/subscribe/post?u=6a33c422777aedd88e9a9488e&id=9b99f013b8

<form action="https://github.us3.list-manage.com/subscribe/post?u=6a33c422777aedd88e9a9488e&amp;id=9b99f013b8" method="post" target="_blank" class="mt-4 sm:flex sm:max-w-md">
  <input name="EMAIL" aria-label="Email address" type="email" required=""
    class="w-full px-5 py-3 text-base leading-6 text-gray-900 placeholder-gray-500 transition duration-150 ease-in-out bg-white border border-transparent rounded-md appearance-none focus:outline-none focus:placeholder-gray-400"
    placeholder="Enter your email">
  <input type="hidden" value="8" name="group[27425][8]" id="mce-group[27425]-27425-3">
  <div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3 sm:flex-shrink-0">
    <button
      class="flex items-center justify-center w-full px-5 py-3 text-base font-medium leading-6 text-white transition duration-150 ease-in-out bg-indigo-600 border border-transparent rounded-md hover:bg-indigo-500 focus:outline-none focus:bg-indigo-500">
      Subscribe </button>
  </div>
</form>

Text Content

Documentation

Tenants

Everything about the Tenant model. Creating tenants, customizing behavior and
more.



Compared to other packages

This package compared to other Laravel multi-tenancy packages.



Event system

The glue that holds together the pieces that make up this package.



Integrations

A list of verified integrations with other Laravel packages.



Configuration

Configure this package to behave exactly the way that fits your needs.



Tenant identification

Everything about identifying tenants. Middlewares, resolvers, or manual
identification.

Open documentation

View the full documentation.

Exclusive content
Sponsor-only

A collection of actionable solutions for common complex problems.

Business

SaaS boilerplate

A fully featured Laravel application skeleton with multi-tenancy, tenant signup
flow, Cashier billing and a Nova admin panel.

Consulting

We offer consulting services for businesses who need help with implementing our
package or related features.

Audits

Have the package author to review your tenancy implementation before you launch.

Learn

Video course

A video course explaining how to create multi-database, subdomain separated
tenants using this package.

Book

A book going through the practical aspects of developing and running a
multi-tenant application using this package.

GitHub Discord Donate
Tutorial Documentation
Tenants

Compared to other packages

Event system

Integrations

Configuration

Tenant identification
SaaS boilerplate Consulting Audits GitHub Discord Donate
Documentation

Tutorial

New version 3


TENANCY FOR LARAVEL

A flexible multi-tenancy package for Laravel. Single & multi-database tenancy,
automatic & manual mode, event-based architecture. Integrates perfectly with
other packages.

Documentation
Tutorial

// Create a tenant
$tenant = Tenant::create();
$tenant->createDomain([
  'domain' => 'acme.com',
]);

// Write your app like you're used to
Order::where('status', 'shipped')->get();
Cache::get('order_count');
asset('logo.png');
dispatch(new SendOrderCreatedMail);


A PACKAGE THAT FITS YOUR NEEDS

stancl/tenancy is a flexible multi-tenancy Laravel package that comes with lots
of features out-of-the-box and doesn't stand in your way when you need anything
custom.

AUTOMATIC TENANCY

Instead of forcing you to change how you write your code, the package by default
bootstraps tenancy automatically, in the background. Database connections are
switched, caches are separated, filesystems are prefixed, etc.

 * AUTOMATIC DATA SEPARATION
   
   Out of the box, the package makes the following things tenant-aware:
   databases, caches, filesystems, queues, redis stores. This means that if
   you've already written your app and are looking to make it multi-tenant, you
   don't have to change anything!

 * INTEGRATES WITH OTHER PACKAGES
   
   Since the automatic mode changes the default database connection, most other
   packages will use this connection too. This means that you can do awesome
   things such as using Laravel Nova inside the tenant application to manage the
   tenant's resources.

 * FULLY TESTABLE
   
   Many other tenancy packages have a terrible track record when it comes to
   testability. We find that unacceptable. With this package, you can test
   everything. The central application, the tenant application, and everything
   in between — including the tenant registration flow.



EXTREME FLEXIBILITY

Version 3 is heavily focused on flexibility, but without sacrificing features.
Even though everything is customizable, the defaults will likely suit you for
the large part.

 * EVENT-BASED ARCHITECTURE
   
   All of the tenancy bootstrapping logic, post-tenant-creation logic, and most
   other things, happen as a result of events firing. You can customize every
   single bit.

 * SINGLE OR MULTI-DATABASE TENANCY
   
   Don't want to use the database-per-tenant approach? No problem, we provide
   you with model traits for scoping models to the current tenant, including
   models that aren't related to the tenant directly.

 * MANUAL TENANCY
   
   Prefer specifying database connections instead of changing the default
   connection? No problem, we have model traits prepared.




PACKED WITH FEATURES

This package has the most features out of all multi-tenancy packages for
Laravel.

SHARED USERS BETWEEN TENANTS

Need to use the database-per-tenant approach but also need to have users that
belong to multiple tenants? We've got you covered. Our Resource Syncing feature
lets you synchronize any database resources between specific tenants' databases.

USER IMPERSONATION

Want to impersonate a user inside a tenant's database from the central context?
Or even from another tenant's context? Just enable the user impersonation
feature in the config.

WORKS WITH ANY DATABASE

Need to separate tenant databases on MySQL/PostgreSQL/SQLite? No problem. Or
maybe you want to use PostgreSQL schemas instead? We can do that too.

READY TO TRY IT?

READ THE DOCUMENTATION.

Documentation
Tutorial


AWESOME INTEGRATION WITH OTHER PACKAGES

Apart from saving you a huge amount of time, the automatic mode has another
great side effect: it lets you integrate almost any other package with no
issues. No more model traits!

Documentation
Tutorial



TRUSTED BY DEVELOPERS

This package powers many production applications on many different hosting
platforms.

Stars on GitHub 1900+
Downloads 270 000+
Sponsors <3 100+

> “Tenancy for Laravel allowed us to effortlessly and quickly integrate the
> needed landlord/tenant functionality for our SaaS platform. It fits our needs
> perfectly.”
> 
> Jørgen Solli
> Owner, Kronos

> “This package enabled us to abstract all the context switching to focus our
> development efforts elsewhere. That resulted in significant performance
> increase. The event driven architecture is powerful, flexible and bends to all
> our needs.”
> 
> Mads Møller
> CTO, Napp

WANT UPDATES ABOUT BIG RELEASES AND PRODUCT LAUNCHES?

SIGN UP FOR OUR NEWSLETTER.

Notify me


FREQUENTLY ASKED QUESTIONS

Is the package ready for production?

Yes! The package is in its third major version and has been stable since
February 2019. Many people are using it in production.

Does the package only support multi‑database tenancy?

No, the package supports multi-database tenancy as well as single-database
tenancy. For multi-database tenancy, it comes with classes for managing
MySQL/SQLite/PostgreSQL databases or schemas and for single-database tenancy it
comes with model scopes and traits.

Is this package flexible?

Yes! Version 3 is focused heavily on flexibility. The package comes with great
defaults for bootstrapping tenancy automatically based on domains, but if you
need to customize anything, or add any behavior — you can do that very easily.

Can I use Laravel Nova with this package?

Yes! You can use Nova both to manage tenants and to manage resources inside
tenant databases.

Does the package work with [package name]?

Likely yes. The automatic mode of tenancy integrates perfectly with 99% of
packages with little to no code changes required.

Can I use Laravel Vapor to deploy an application using this package?

Yes, many people are using the package on Vapor and reported no issues at all.

If I need help, is there any support?

Yes, you can ask questions on our Discord community. We also offer paid
consulting — just shoot us an email.

DOCUMENTATION

 * Tenants
 * Event system
 * Configuration

DOCUMENTATION

 * Compared to other packages
 * Integrations
 * Tenant identification

BUSINESS

 * SaaS boilerplate
 * Consulting
 * Audits

LINKS

 * Branding
 * GitHub
 * Discord
 * Donate

SUBSCRIBE TO OUR NEWSLETTER

Receive notifications about important releases, new packages and other updates.

Subscribe
Twitter GitHub

Made by ArchTech. © 2021 All rights reserved.