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 Initialization

Tenancy can be initialized using the following methods on Stancl\Tenancy\TenantManager: - initializeTenancy($tenant) - initialize($tenant) - init($domain)

Similarly, tenancy can be ended using: - endTenancy() - end()

You can use these methods in php artisan tinker.

Tenant Routes have the InitializeTenancy middleware applied to them. That middleware automatically initializes tenancy for the current hostname.

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