mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 19:24:02 +00:00
Use new static instead of checking class_implements()
This commit is contained in:
parent
f0faf41522
commit
73144a874a
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ trait BelongsToTenant
|
|||
{
|
||||
// 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') || (new static) instanceof RLSModel)) {
|
||||
static::addGlobalScope(new TenantScope);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue