if (!$license) return ['valid' => false, 'message' => 'License not found.'];
if ($activeDomains >= $license->max_domains) // allow if this domain is already activated return $license->activations()->where('domain', $domain)->exists(); laravel license key system
protected function checkDomainLimit(License $license, string $domain): bool if (!$license) return ['valid' =>
if ($domain && !$this->checkDomainLimit($license, $domain)) return ['valid' => false, 'message' => 'Domain limit exceeded.']; 'License not found.']