Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Reusable Form #83

Open
abbasmashaddy72 opened this issue Jan 31, 2022 · 1 comment
Open

Reusable Form #83

abbasmashaddy72 opened this issue Jan 31, 2022 · 1 comment

Comments

@abbasmashaddy72
Copy link

Hi,

How Can use the same form for Create, update with livewire?

@mrl22
Copy link
Contributor

mrl22 commented Apr 5, 2022

Not really a laravel-form-components question, but assuming you are using livewire, you could have a public $id field and on submit() and after validate, you could use the laravel updateOrCreate() method with the $id field.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants