tenancy-docs/docs/source/v2/tenancy-initialization.blade.md
2019-09-22 19:28:58 +02:00

649 B

title description extends section
Tenancy Initialization Tenancy Initialization.. _layouts.documentation_v2 content

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]({{ $page->link('tenant-routes') }}) have the InitializeTenancy middleware applied to them. That middleware automatically initializes tenancy for the current hostname.