Replies: 1 comment
-
@tomworks It is possible, but you have to use a mixin or hook. A better option would be using Livewire Forms or any other form logic from your UI solution. In my case I use Livewire Forms together with this package. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
Currently looking to use laravel-html as replacement for collective-html.
In collective-html there is the model form method of "getFormValue()" which allows you to perform logic on the model to populate the field from the model.
This is particularly useful when have a form that represents several different related models. I couldn't see anything similar in laravel-html, did I miss something?
Looks as though just have to rely on a model having the same name as model attribute in the old() method:
https://github.com/spatie/laravel-html/blob/main/src/Html.php#L596
Thanks
Tom
Beta Was this translation helpful? Give feedback.
All reactions