Jangan meng-harcode indeks larik unggahan. Alih-alih, buat larik Anda secara dinamis:
$i = 0;
$uploads = array();
if(move_uploaded_file($file_tmp, $file_destination)) {
$uploaded[$position] = $file_destination;
$image = ($i==0) ? 'image' : 'image_'.$i;
$uploads[$image]=$uploaded;
$i++;
}
Kemudian gunakan:
$insert = DB::getInstance()->insert('stock', $uploads);