lundi 10 décembre 2018

Laravel how to map the array format

here's my laravel source code Please help me solve this question

$WechatQrcode = collect($request->toArray()).map(function ($item){
   return [
           'showid' => $data->id,
           'showname' =>$data->name
         ];
  });                      
 return (new FastExcel($WechatQrcode))->download('file.csv');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire