mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Tenancy bootstrappers page
This commit is contained in:
parent
7b58d402a5
commit
fd1695000b
3 changed files with 21 additions and 0 deletions
|
|
@ -82,6 +82,7 @@ return [
|
||||||
'Jobs & Queues' => 'jobs-queues',
|
'Jobs & Queues' => 'jobs-queues',
|
||||||
'Event System' => 'event-system',
|
'Event System' => 'event-system',
|
||||||
'Tenancy Initialization' => 'tenancy-initialization',
|
'Tenancy Initialization' => 'tenancy-initialization',
|
||||||
|
'Tenancy Bootstrappers' => 'tenancy-bootstrappers',
|
||||||
'Application Testing' => 'application-testing',
|
'Application Testing' => 'application-testing',
|
||||||
'Writing Storage Drivers' => 'writing-storage-drivers',
|
'Writing Storage Drivers' => 'writing-storage-drivers',
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,8 @@ The following actions can be prevented:
|
||||||
- Redis prefix: `redis`
|
- Redis prefix: `redis`
|
||||||
- CacheManager switch: `cache`
|
- CacheManager switch: `cache`
|
||||||
- Filesystem changes: `filesystem`
|
- Filesystem changes: `filesystem`
|
||||||
|
- Queue tenancy: `queue`
|
||||||
|
- and anything else listed in the [`tenancy.bootstrappers` config]({{ $page->link('configuration#bootstrappers') }})
|
||||||
|
|
||||||
### Tenant-specific configuration example {#tenant-specific-configuration-example}
|
### Tenant-specific configuration example {#tenant-specific-configuration-example}
|
||||||
|
|
||||||
|
|
|
||||||
18
docs/source/v2/tenancy-bootstrappers.blade.md
Normal file
18
docs/source/v2/tenancy-bootstrappers.blade.md
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: Tenancy Bootstrappers
|
||||||
|
description: Tenancy Bootstrappers
|
||||||
|
extends: _layouts.documentation_v2
|
||||||
|
section: content
|
||||||
|
---
|
||||||
|
|
||||||
|
# Tenancy Bootstrappers {#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]({{ $page->link('tenancy-initialization') }}), the `start()` method on the [enabled bootstrappers]({{ $page->link('configuration#bootstrappers') }}) is called.
|
||||||
|
|
||||||
|
Conversely, when tenancy is ended, the `end()` method is called.
|
||||||
|
|
||||||
|
In the [`tenancy.bootstrappers` configuration]( {{ $page->link('configuration#bootstrappers') }} ), bootstrappers have an alias configured (e.g. `database`) that is used by [events]({{ $page->link('event-system') }}) to say which bootstrappers are prevented.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue