$inputs = $request->input('function_count'); foreach($inputs as $id=>$value){ // $id being the content of $item->id // $value being the content of value="" }