2017-08-30 51 views

回答

0
$excelData[] = ['Report']; 
$data = $user->get(); 
$grandTotal = 0; 
$verticalCount = []; 
$verticalCount['S. No'] = ''; 
$verticalCount['Name'] = 'Total'; 
$keys = []; 

foreach($data as $d=>$k){ 
     $_excelData = [ 
      "S. No" => $d + 1, 
      "Name Of Admin" => $k->name 
     ]; 

//$dates containing date of given time period 
foreach ($dates as $date) { 
      $_excelData[$date] += 1; 
      $verticalCount[$date] += 1; 
     } 

    }