mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 00:14:05 +00:00
Rename method
This commit is contained in:
parent
66c2ac4fa4
commit
238132781d
1 changed files with 2 additions and 2 deletions
|
|
@ -24,7 +24,7 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
{
|
{
|
||||||
DB::transaction(function () {
|
DB::transaction(function () {
|
||||||
foreach (tenancy()->getTenantModels() as $model) {
|
foreach (tenancy()->getTenantModels() as $model) {
|
||||||
$this->useRlsOnModel($model);
|
$this->applyRlsOnModel($model);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -34,7 +34,7 @@ class CreateRLSPoliciesForTenantTables extends Command
|
||||||
/**
|
/**
|
||||||
* Make model use RLS if it belongs to a tenant directly, or through a parent primary model.
|
* Make model use RLS if it belongs to a tenant directly, or through a parent primary model.
|
||||||
*/
|
*/
|
||||||
protected function useRlsOnModel(Model $model): void
|
protected function applyRlsOnModel(Model $model): void
|
||||||
{
|
{
|
||||||
$table = $model->getTable();
|
$table = $model->getTable();
|
||||||
$tenantKeyName = tenancy()->tenantKeyColumn();
|
$tenantKeyName = tenancy()->tenantKeyColumn();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue