mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Add instruction to empty scout.prefix config on TenancyEnded
This commit is contained in:
parent
225b22c03e
commit
1d68074412
1 changed files with 6 additions and 0 deletions
|
|
@ -13,6 +13,12 @@ After [installing Scout](https://laravel.com/docs/9.x/scout#installation), make
|
|||
config(['scout.prefix' => tenant()->getTenantKey()]);
|
||||
```
|
||||
|
||||
And to reset the prefix as tenancy ends, add a listener with this code to the `TenancyEnded` event:
|
||||
|
||||
```php
|
||||
config(['scout.prefix' => '']);
|
||||
```
|
||||
|
||||
After that, you can import your existing records for each tenant using the `tenants:run` command:
|
||||
|
||||
```
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue