$sum_counter = ['total_sum' => 0];
foreach ($few_itteartion as $itearator_key => $some_ar) {
if (!isset($sum_counter['sum_for_ittaration'][$itearator_key]))
$sum_counter['sum_for_ittaration'][$itearator_key] = 0;
foreach ($some_ar as $v) {
$sum_counter['total_sum'] += $v['sum'];
$sum_counter['sum_for_ittaration'][$itearator_key] += $v['sum'];
}
}
$array = array('имя', 'почта', 'телефон');
$comma_separated = implode(",", $array);
$this->allInput = $request->all();
$string = implode(",", $this->allInput['orders']);
<input id="id1" type="number" min="100" max="300" required>
<button onclick="myFunction()">OK</button>
<p id="demo"></p>
<script>
function myFunction() {
var inpObj = document.getElementById("id1");
if (!inpObj.checkValidity()) {
document.getElementById("demo").innerHTML = inpObj.validationMessage;
}
}
</script>