min

Version 1.x

Version 2.x

Version 3.x

GitHub
  • Upgrading from 1.x
  • Getting Started
    • Installation
    • Storage Drivers
    • This Package vs Others
    • Configuration
  • Usage
    • Creating Tenants
    • Tenant Migrations
    • Tenant Routes
    • Tenant Storage
    • Tenant Manager
    • Console Commands
  • Digging Deeper
    • Tenants
    • Central App
    • Universal Routes
    • Cached Tenant Lookup
    • PostgreSQL schema separation
    • Custom Database Names
    • Custom DB Connections
    • Disabling DB Creation
    • Filesystem Tenancy
    • Jobs & Queues
    • Hooks / Events
    • Tenancy Initialization
    • Tenancy Bootstrappers
    • Application Testing
    • Tenant-Aware Commands
    • Middleware Configuration
    • Writing Storage Drivers
  • Optional Features
    • Tenant Config
    • Timestamps
    • Tenant Redirect
  • Integrations
    • Spatie Packages
    • Horizon
    • Passport
    • Nova
    • Telescope
    • Livewire
  • Tips

    • HTTPS Certificates
    • Misc
  • Stay Updated
  • GitHub
  • Tutorial
You're looking at v2 documentation. The current version is v3. You can find the docs for the current version here.

Tenancy Bootstrappers

These are the classes that do the magic. When tenancy is initialized, TenancyBootstrappers are executed, making Laravel tenant-aware.

All Tenancy Bootstrappers must implement the Stancl\Tenancy\Contracts\TenancyBootstrapper interface.

When tenancy is initialized, the start() method on the enabled bootstrappers is called.

Conversely, when tenancy is ended, the end() method is called.

In the tenancy.bootstrappers configuration, bootstrappers have an alias configured (e.g. database) that is used by events to say which bootstrappers are prevented.

Edit on GitHub

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.

Twitter GitHub

Made by ArchTech. © 2024 All rights reserved.

Save time with our SaaS application template. Want to save time? Get our multi-tenant SaaS application template.

SaaS boilerplate