I have array, so i want to store all of in array to DB horizontally
This Is My Code :
$tes = ['table','chair','computer'];
for ($i = 0; $i < count($tes); $i++) {
$a = $tes[$i];
DB::table('store')
->where('material_number', $material_number)
->update([
'name' => $a,
]);
}
I want to store to row name like this table,chair,computer 1 row in DB
Can anyone help me? Thanks.