1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-04 20:54:03 +00:00
This commit is contained in:
Samuel Štancl 2019-08-20 13:49:41 +02:00
parent 6737172589
commit dcc7a8a210

View file

@ -15,6 +15,8 @@ The following events are available:
- `ending` - `ending`
- `ended` - `ended`
### Tenant-specific database connection example {#tenant-specific-database-connection-example}
You can hook into these events using `Tenancy::<eventName>`: You can hook into these events using `Tenancy::<eventName>`:
```php ```php
\Tenancy::boostrapping(function ($tenantManager) { \Tenancy::boostrapping(function ($tenantManager) {
@ -35,6 +37,8 @@ The following actions can be prevented:
- CacheManager switch: `cache` - CacheManager switch: `cache`
- Filesystem changes: `filesystem` - Filesystem changes: `filesystem`
### Tenant-specific configuration example {#tenant-specific-configuration-example}
Another common use case for events is tenant-specific config: Another common use case for events is tenant-specific config:
```php ```php
\Tenancy::bootstrapped(function ($tenantManager) { \Tenancy::bootstrapped(function ($tenantManager) {