1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:54:03 +00:00

Rename RLSModel to RlsModel, fix global scope test

This commit is contained in:
lukinovec 2023-06-07 13:55:43 +02:00
parent f84e3ffc02
commit fa43d8ae1d
3 changed files with 19 additions and 26 deletions

View file

@ -21,9 +21,9 @@ trait BelongsToTenant
public static function bootBelongsToTenant(): void
{
// If tenancy.database.rls is true or this model implements RLSModel
// If tenancy.database.rls is true or this model implements RlsModel
// Scope queries using Postgres RLS instead of TenantScope
if (! (config('tenancy.database.rls') || in_array(RLSModel::class, class_implements(static::class)))) {
if (! (config('tenancy.database.rls') || in_array(RlsModel::class, class_implements(static::class)))) {
static::addGlobalScope(new TenantScope);
}

View file

@ -12,6 +12,6 @@ namespace Stancl\Tenancy\Database\Concerns;
*
* @see \Stancl\Tenancy\Database\Concerns\BelongsToTenant
*/
interface RLSModel
interface RlsModel
{
}