'boolean', 'dns_verified_at' => 'datetime', 'ssl_issued_at' => 'datetime', 'ssl_expires_at' => 'datetime', ]; } public function qrCode(): BelongsTo { return $this->belongsTo(QrCode::class); } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function isLive(): bool { return $this->status === self::STATUS_ACTIVE && $this->ssl_status === self::STATUS_ACTIVE; } protected static function booted(): void { static::saving(function (CustomDomain $d) { $d->host = strtolower(trim((string) $d->host, " \t\n\r\0\x0B./")); $d->host = preg_replace('/^www\./', '', $d->host) ?: $d->host; }); } }