From 315b1645331b86fad469f77e493e1df11c8f68c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Vit=C3=A1sek?= Date: Wed, 15 Nov 2023 15:29:14 +0100 Subject: [PATCH] Changed edit to save to match the Blade template When I generate the form using `php artisan make:livewire-form DMS/EditDocument --generate`, I get two files - the resource and the Livewire class. The resource has this code: ```
``` The Livewire class has this method: ``` public function edit(): void ``` These don't match and thus don't work out of the box. Can we consolidate this? --- packages/forms/stubs/EditForm.stub | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/forms/stubs/EditForm.stub b/packages/forms/stubs/EditForm.stub index b9c8b9ad09..609f673b40 100644 --- a/packages/forms/stubs/EditForm.stub +++ b/packages/forms/stubs/EditForm.stub @@ -33,7 +33,7 @@ class {{ class }} extends Component implements HasForms ->model($this->record); } - public function edit(): void + public function save(): void { $data = $this->form->getState(); @@ -44,4 +44,4 @@ class {{ class }} extends Component implements HasForms { return view('{{ view }}'); } -} \ No newline at end of file +}