This commit is contained in:
Andras Bacsai
2023-06-22 15:25:57 +02:00
parent 6aa7cbade0
commit ee211aba51
8 changed files with 56 additions and 22 deletions

View File

@@ -8,22 +8,15 @@ use Livewire\Component;
class Edit extends Component
{
public Project $project;
public string|null $wildcard_domain = null;
protected $rules = [
'project.name' => 'required|min:3|max:255',
'project.description' => 'nullable|string|max:255',
'wildcard_domain' => 'nullable|string|max:255',
];
public function mount()
{
$this->wildcard_domain = $this->project->settings->wildcard_domain;
}
public function submit()
{
$this->validate();
try {
$this->project->settings->wildcard_domain = $this->wildcard_domain;
$this->project->settings->save();
$this->project->save();
$this->emit('saved');
} catch (\Exception $e) {