mirror of
https://github.com/stancl/tenancy-docs.git
synced 2025-12-12 10:14:03 +00:00
Merge 10851f7469 into 2be4b681d0
This commit is contained in:
commit
ff8966ddab
2 changed files with 26 additions and 0 deletions
|
|
@ -205,6 +205,7 @@ return [
|
|||
'Passport' => 'integrations/passport',
|
||||
'Nova' => 'integrations/nova',
|
||||
'Telescope' => 'integrations/telescope',
|
||||
'Scout' => 'integrations/scout',
|
||||
'Livewire' => 'integrations/livewire',
|
||||
'Orchid' => 'integrations/orchid',
|
||||
'Sanctum' => 'integrations/sanctum',
|
||||
|
|
|
|||
25
source/docs/v3/integrations/scout.blade.md
Normal file
25
source/docs/v3/integrations/scout.blade.md
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
---
|
||||
title: Laravel Scout integration
|
||||
extends: _layouts.documentation
|
||||
section: content
|
||||
---
|
||||
|
||||
# Laravel Scout {#laravel-scout}
|
||||
> Note: Make sure the Scout config file is published
|
||||
|
||||
After [installing Scout](https://laravel.com/docs/9.x/scout#installation), add `ScoutTenancyBootstrapper` to the bootstrappers in your Tenancy config (`config/tenancy.php`):
|
||||
|
||||
```php
|
||||
'bootstrappers' => [
|
||||
...
|
||||
Stancl\Tenancy\Bootstrappers\Integrations\ScoutTenancyBootstrapper::class,
|
||||
],
|
||||
```
|
||||
|
||||
This makes sure the models of all tenants aren't being imported in the same index by prefixing the model indices with the current tenant's key.
|
||||
|
||||
You can import your existing records for each tenant using the `tenants:run` command:
|
||||
|
||||
```
|
||||
php artisan tenants:run scout:import --argument="model=App\Models\YourSearchableModel"
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue