protonemedia / laravel-form-components

A set of Blade components to rapidly build forms with Tailwind CSS (v1.0 and v2.0) and Bootstrap 4/5. Supports validation, model binding, default values, translations, Laravel Livewire, includes default vendor styling and fully customizable!
https://protone.media/blog/laravel-form-components-to-rapidly-build-forms-with-tailwind-css-and-bootstrap-4
MIT License
816 stars 102 forks source link

Reusable Form #83

Open abbasmashaddy72 opened 2 years ago

abbasmashaddy72 commented 2 years ago

Hi,

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

mrl22 commented 2 years ago

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.