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:
parent
f84e3ffc02
commit
fa43d8ae1d
3 changed files with 19 additions and 26 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,6 @@ namespace Stancl\Tenancy\Database\Concerns;
|
|||
*
|
||||
* @see \Stancl\Tenancy\Database\Concerns\BelongsToTenant
|
||||
*/
|
||||
interface RLSModel
|
||||
interface RlsModel
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue