mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 09:54:05 +00:00
Use getTenantModels instead of getModels in RLS poilcy creation command
This commit is contained in:
parent
f0b31d1820
commit
8c87dde85d
1 changed files with 1 additions and 1 deletions
|
|
@ -20,7 +20,7 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
public function handle(): int
|
public function handle(): int
|
||||||
{
|
{
|
||||||
DB::transaction(function () {
|
DB::transaction(function () {
|
||||||
tenancy()->getModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
tenancy()->getTenantModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||||
});
|
});
|
||||||
|
|
||||||
return Command::SUCCESS;
|
return Command::SUCCESS;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue