genealabs / laravel-tenancy-scout
Providing scout commands for the Laravel Tenancy package.
0.4.0
2024-05-11 15:56 UTC
Requires
- hyn/multi-tenant: *
- illuminate/support: ^10.0|^11.0
- laravel/scout: ^10.0|^11.0
README
Providing scout commands for the Laravel Tenancy package.
Installation
composer require genealabs/laravel-tanancy-scout
Usage
Instead of applying UsesTenantConnection
to your models, apply SearchableTenantConnection
from this package:
<?php namespace App; use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Foundation\Auth\User as Authenticatable; use GeneaLabs\LaravelTenancyScout\Traits\SearchableTenantConnection; class User extends Authenticatable { use SearchableTenantConnection; }
Based On
Bertrand Son Kintanar, "How to implement Laravel Scout with Tenancy," Medium (https://medium.com/@bkintanar/how-to-implement-laravel-scout-with-tenancy-79cba01ad0b4). Accessed on 11 July 2020.