POST requests can only POST strings, it's just how the HTTP protocol works.
If you really need to be posting integers or anything but strings, you should be posting JSON (which actually has types).
Normally, you'd simply cast the data into the correct type before validating.
If you want to cast them and you are using the FormRequest validation methods of laravel you can override the following method in your request class to do so:
protected function validationData()
{
$data = $this->all();
foreach($data['my_array'] as $key => $num) {
$data['my_array'][$key] = (int) $num;
}
return $data;
}
Besides that, if your database has the field set as int and you try to insert the string '2' it will convert it to the integer 2 while saving, so it shouldn't matter in the case you describe.