From 0e43e5d295f1ebbf891baf8f52087f5950d75994 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 16 Apr 2024 09:43:42 +0200 Subject: [PATCH] Refactor General.php to update application fqdn handling --- app/Livewire/Project/Application/General.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/Livewire/Project/Application/General.php b/app/Livewire/Project/Application/General.php index 2468112b8..0def08bb2 100644 --- a/app/Livewire/Project/Application/General.php +++ b/app/Livewire/Project/Application/General.php @@ -214,6 +214,12 @@ class General extends Component } public function updatedApplicationFqdn() { + $this->application->fqdn = str($this->application->fqdn)->replaceEnd(',', '')->trim(); + $this->application->fqdn = str($this->application->fqdn)->replaceStart(',', '')->trim(); + $this->application->fqdn = str($this->application->fqdn)->trim()->explode(',')->map(function ($domain) { + return str($domain)->trim()->lower(); + }); + $this->application->fqdn = $this->application->fqdn->unique()->implode(','); $this->resetDefaultLabels(); } public function updatedApplicationBuildPack()