1
0
Fork 0
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:
lukinovec 2023-06-15 13:44:31 +02:00
parent f0b31d1820
commit 8c87dde85d

View file

@ -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;