From 1d68074412790d37b7d058663e5b14a64fd59057 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Tue, 30 Aug 2022 11:17:35 +0200 Subject: [PATCH] Add instruction to empty scout.prefix config on TenancyEnded --- source/docs/v3/integrations/scout.blade.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/docs/v3/integrations/scout.blade.md b/source/docs/v3/integrations/scout.blade.md index 45f7c3d..9d82972 100644 --- a/source/docs/v3/integrations/scout.blade.md +++ b/source/docs/v3/integrations/scout.blade.md @@ -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: ```