diff --git a/src/Scopes/AAuthOrganizationNodeScope.php b/src/Scopes/AAuthOrganizationNodeScope.php index 279010b..acab97d 100644 --- a/src/Scopes/AAuthOrganizationNodeScope.php +++ b/src/Scopes/AAuthOrganizationNodeScope.php @@ -15,7 +15,7 @@ class AAuthOrganizationNodeScope implements \Illuminate\Database\Eloquent\Scope */ public function apply(Builder $builder, Model $model): void { - $organizationNodeIds = AAuth::organizationNodes(true, $model::getModelType())->pluck('model_id'); - $builder->whereIn('id', $organizationNodeIds); + $organizationNodeModelIds = AAuth::organizationNodes(true, $model::getModelType())->pluck('model_id'); + $builder->whereIn('id', $organizationNodeModelIds); } }