I have a post route and I want to add a foreach loop to the request like this:
public function updateProductAttrsInfo(Request $request, $id) { foreach($request as $req){ dd($req); } }
But this is wrong because $request is an object and not an array, so foreach cannot be applied to it.
So I'm wondering how to properly apply foreach to this $request
?