im new using laravel and i get a problem. and there is my var_dump (post request)
+request: Symfony\Component\HttpFoundation\ParameterBag {#44 ▼
#parameters: array:12 [▼
"_token" => "R1fnZMtNA55fy1plkTuztuhMZ1ExvkSw01GJq4rN"
"spg" => "test"
"nama" => "Reynaldo"
"alamat" => "123"
"hp" => "2134"
"ccs" => "1"
"cos" => "2"
"oss" => "Qty"
"tvs" => "Qty"
"tcs" => "Qty"
"lngs" => "Qty"
"tks" => "Qty"
]
this if my HTML form:
@foreach ($products as $product)
<div class="form-group row col-md-12">
<label for="{{ $product->slug }}" class="col-sm-3 col-form-label">{{ $product->nama }}</label>
<div class="col-sm-7">
<select class="custom-select col-sm-2" name="{{ $product->slug }}" required>
<option hidden>Qty</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
</div>
</div>
@endforeach
the problem is, how can I modify post request (add array and don't send 'qty' value)? i want to look like this :
+request: Symfony\Component\HttpFoundation\ParameterBag {#44 ▼
#parameters: array:12 [▼
"_token" => "R1fnZMtNA55fy1plkTuztuhMZ1ExvkSw01GJq4rN"
"spg" => "test"
"nama" => "Reynaldo"
"alamat" => "123"
"hp" => "2134"
product array [
"ccs" => "1"
"cos" => "2"
"oss" => "Qty"
"tvs" => "Qty"
"tcs" => "Qty"
"lngs" => "Qty"
"tks" => "Qty"
]
]
very grateful if someone helps. sorry for my broken English. thankyou.