Answers for "multe data on database laravel"

PHP
0

multe data on database laravel

$data = $request->all();
$finalArray = array();
foreach($data as $key=>$value){
   array_push($finalArray, array(
                'fltno'=>$value['sflt'],
                'model'=>$value['smodel'],
                'engine'=>$value['sengine'],
                'loc'=>$value['sloc'],
                'serviceType'=>$value['sstye'],
                'nextSvr'=> $value['snsvr'] )
   );
});

Model::insert($finalArray);
Posted by: Guest on October-29-2020

Code answers related to "multe data on database laravel"

Browse Popular Code Answers by Language