multe data on database laravel

Solutions on MaxInterview for multe data on database laravel by the best coders in the world

showing results for - "multe data on database laravel"
Fabio
27 Jul 2019
1$data = $request->all();
2$finalArray = array();
3foreach($data as $key=>$value){
4   array_push($finalArray, array(
5                'fltno'=>$value['sflt'],
6                'model'=>$value['smodel'],
7                'engine'=>$value['sengine'],
8                'loc'=>$value['sloc'],
9                'serviceType'=>$value['sstye'],
10                'nextSvr'=> $value['snsvr'] )
11   );
12});
13
14Model::insert($finalArray);
15