Livewire component with modal $this->form->fill() not working?
I'm trying to make it so when a user clicks on an item in my list, a slideOver modal shows and is passed the specific item to get the data for and populate the field. However, if I do
@json($this->form)
it shows an empty model, and if i do @json($this->form->getState()
I get the error No property found for validation: [data.title]
.
Here's the livewire component:
Solution:Jump to solution
since you're using
->statePath('data')
you need to add
public $data = [];
...2 Replies