feat: add SeedDemoDataCommand for seeding production-like demo data for testing representations, doctors, clinics, users, appointments, and commissions
This commit is contained in:
@@ -56,7 +56,10 @@ class DomainContextResolver
|
||||
return new DomainContext($rep, $city, false);
|
||||
}
|
||||
|
||||
$rep = $this->representationRepo->findActiveByDomain($domain);
|
||||
// exact ابتدا (production: host = دامنهی واقعی)، سپس fallback اولین-label
|
||||
// (dev: host = `<prefix>.localhost` باید نمایندهی `<prefix>.ir` را بیابد).
|
||||
$rep = $this->representationRepo->findActiveByDomain($domain)
|
||||
?? $this->representationRepo->findActiveByDomainPrefix(explode('.', $domain)[0]);
|
||||
if ($rep !== null) {
|
||||
return new DomainContext($rep, null, $rep->isGlobal());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user