I am in need of some assistance.
What I am trying to do in Laravel 5: A cron generated a requisition with multiple line items/products. I have a qty, supplier, part number and name field for each line item created. I can display the line items perfectly. However, I am not sure how it can be updated. What I need is that the qty's can be edited throughout the line items, and once the user clicks save, the controller should update each line item respectively.
What I have so far:
My blade view looks like this:
{!! Form::label('qty', 'Qty', ['class' => 'control-label']) !!}
{!! Form::number("line.$i.qty", $line->qty, ['class' => 'form-control']) !!}
When I do the following in my controller:
$inputs = $request->all();
var_dump($inputs);
I can see the data, but I'm not sure how I can update the DB from there. I'm guessing some type of foreach statement?
Any help will be greatly appreciated.