lasthourcloud/app/Http/Livewire/Project/Service/ComposeModal.php

24 lines
581 B
PHP
Raw Normal View History

<?php
namespace App\Http\Livewire\Project\Service;
2023-12-06 13:57:03 +00:00
use App\Models\Service;
use Livewire\Component;
class ComposeModal extends Component
{
2023-12-06 13:57:03 +00:00
public Service $service;
protected $rules = [
'service.docker_compose_raw' => 'required',
'service.docker_compose' => 'required',
];
public function render()
{
return view('livewire.project.service.compose-modal');
}
public function submit() {
$this->emit('warning', "Saving new docker compose...");
2023-12-06 13:57:03 +00:00
$this->emit('saveCompose', $this->service->docker_compose_raw);
}
}