genealabs/laravel-tenancy-scout

Providing scout commands for the Laravel Tenancy package.

0.4.0 2024-05-11 15:56 UTC

This package is auto-updated.

Last update: 2024-10-11 16:48:31 UTC


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.