Add updatedApplicationFqdn method to ServiceApplicationView
This commit is contained in:
parent
3cdccb49ef
commit
c223408c3c
@ -24,6 +24,16 @@ class ServiceApplicationView extends Component
|
|||||||
{
|
{
|
||||||
return view('livewire.project.service.service-application-view');
|
return view('livewire.project.service.service-application-view');
|
||||||
}
|
}
|
||||||
|
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->application->save();
|
||||||
|
}
|
||||||
public function instantSave()
|
public function instantSave()
|
||||||
{
|
{
|
||||||
$this->submit();
|
$this->submit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user