What seems to be the problem:
I have a form that is being built by the amount of tests required to be done on a patient. If the company selects 2 two tests, these tests need to be pulled and I need to update the db to state if the test has been done. I have been able to do this using a normal Laravel Controller but not sure how you would do something like this using Livewire. Any assistance would be greatly appreciated.
Steps to Reproduce:
In my blade:
<input type="text" name="{{ $bloodtest->id }}">
My current code in Laravel Controller
foreach($bloodtests as $bloodtest)
{
$id = $bloodtest->id;
$bloodtest = BloodTest::find($bloodtest->id);
$bloodtest->result = $request->$id;
$bloodtest->save();
Now I would like to perform the same logic using Livewire. The problem comes when I input a value, I get an error due to the public property not being set. I’m not sure how you set a public property using a foreach loop to set multiple public properties.
Are you using the latest version of Livewire:
Yes
Do you have any screenshots or code examples: