Changeset View
Changeset View
Standalone View
Standalone View
src/app/Observers/DomainObserver.php
Show First 20 Lines • Show All 46 Lines • ▼ Show 20 Lines | public function deleted(Domain $domain) | ||||
if ($domain->isForceDeleting()) { | if ($domain->isForceDeleting()) { | ||||
return; | return; | ||||
} | } | ||||
\App\Jobs\Domain\DeleteJob::dispatch($domain->id); | \App\Jobs\Domain\DeleteJob::dispatch($domain->id); | ||||
} | } | ||||
/** | /** | ||||
* Handle the domain "deleting" event. | |||||
* | |||||
* @param \App\Domain $domain The domain. | |||||
* | |||||
* @return void | |||||
*/ | |||||
public function deleting(Domain $domain) | |||||
{ | |||||
\App\Policy\RateLimitWhitelist::where( | |||||
[ | |||||
'whitelistable_id' => $domain->id, | |||||
'whitelistable_type' => Domain::class | |||||
] | |||||
)->delete(); | |||||
} | |||||
/** | |||||
* Handle the domain "updated" event. | * Handle the domain "updated" event. | ||||
* | * | ||||
* @param \App\Domain $domain The domain. | * @param \App\Domain $domain The domain. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
public function updated(Domain $domain) | public function updated(Domain $domain) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |