mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 03:54:03 +00:00
Use reflection instead of try/catch, use arrays instead of collections
This commit is contained in:
parent
8d13ce7e2f
commit
eddb95c014
3 changed files with 23 additions and 21 deletions
|
|
@ -23,7 +23,9 @@ class CreateRLSPoliciesForTenantTables extends Command
|
|||
public function handle(): int
|
||||
{
|
||||
DB::transaction(function () {
|
||||
tenancy()->getTenantModels()->each(fn (Model $model) => $this->useRlsOnModel($model));
|
||||
foreach (tenancy()->getTenantModels() as $model) {
|
||||
$this->useRlsOnModel($model);
|
||||
}
|
||||
});
|
||||
|
||||
return Command::SUCCESS;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue