I am trying to store multiple records in my database but I'm getting errors. At the moment I have this:
$array=array('key'=>'value');
for($i = 0; $i < $something; $i++){
array_add($array,'key','value')
}
DB::table('table')->insert($array);
Whenever I var_dump($array); It wont show the values of the array_add I add into the array.
What am I doing wrong and how should I insert like this?
DB::table('table')->insert($array);This is in the Laravel framework query builder.=>and,do the same in this case? I've already tried to get both of them the same. Either=>or,