genealabs/laravel-tenancy-scout

Providing scout commands for the Laravel Tenancy package.

0.3.0 2023-01-02 14:03 UTC

This package is auto-updated.

Last update: 2024-04-10 22:21:18 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.