settings, 'plan', 'free'); } public function isPro(Organization $organization): bool { return $this->plan($organization) === 'pro'; } public function maxBranches(Organization $organization): ?int { return config('qms.plans.'.$this->plan($organization).'.max_branches'); } public function maxQueues(Organization $organization): ?int { return config('qms.plans.'.$this->plan($organization).'.max_queues'); } public function canAddBranch(Organization $organization, int $currentCount): bool { $max = $this->maxBranches($organization); return $max === null || $currentCount < $max; } public function canAddQueue(Organization $organization, int $currentCount): bool { $max = $this->maxQueues($organization); return $max === null || $currentCount < $max; } }