lundi 3 juin 2019

how to manipulate laravel get request with multiple data set

i got laravel request form data with multiple data set like:-

array:5 [▼
  "start_date" => array("2019-01-01","2019-01-02","2019-01-03");
  "planned" => array("1","2","3");
  "planned_inc" => array("2","8","16.5");
  "actual_inc" => array:10("7.9","1.2","3.6");
]

i want to manipulate data set like:-

$data = ['2019-01-01', '1', '2', '7.9'];

$formData =  request(['start_date', 'planned', 'planned_incr', 'actual_incr' ,'actual']);
dd($formData);
foreach ($formData as $data) {
    $jso = $data['start_date'];
    $da = $data['planned'];
    print_r($da);
}



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/2WdROxl
via IFTTT

Aucun commentaire:

Enregistrer un commentaire