Changeset View
Changeset View
Standalone View
Standalone View
src/app/Observers/DomainObserver.php
Show All 20 Lines | public function creating(Domain $domain): void | ||||
if (!Domain::find($allegedly_unique)) { | if (!Domain::find($allegedly_unique)) { | ||||
$domain->{$domain->getKeyName()} = $allegedly_unique; | $domain->{$domain->getKeyName()} = $allegedly_unique; | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
$domain->namespace = \strtolower($domain->namespace); | $domain->namespace = \strtolower($domain->namespace); | ||||
$domain->status |= Domain::STATUS_NEW | Domain::STATUS_ACTIVE; | $domain->status |= Domain::STATUS_NEW; | ||||
} | } | ||||
/** | /** | ||||
* Handle the domain "created" event. | * Handle the domain "created" event. | ||||
* | * | ||||
* @param \App\Domain $domain The domain. | * @param \App\Domain $domain The domain. | ||||
* | * | ||||
* @return void | * @return void | ||||
▲ Show 20 Lines • Show All 72 Lines • Show Last 20 Lines |