'json', ]; public static function booted(): void { static::deleting(function ($dispatcher) { foreach ($dispatcher->gateway->type->list($dispatcher->name, $dispatcher->gateway->domain) as $email) { $dispatcher->gateway->type->remove($dispatcher->name, $dispatcher->gateway->domain, $email->email); } }); } public function gateway(): BelongsTo { return $this->belongsTo(Mailgateway::class); } }