0, "type" => [0, 1], "year" => "2018", "sell_starttime" => "$i-01-01 00:00:00", "sell_endtime" => "$i-12-31 23:59:59", ]; $filename = "${i}销售在2018年报表.xlsx"; $export = new CompanyYearReportExport($conditions); Excel::store($export, $filename, 'public'); $url = Storage::disk($disk)->url($filename); echo $url . PHP_EOL; for ($j = 1; $j <= 12; $j++) { $conditions = [ "limit" => 0, "type" => [0, 1], "month" => "2019-$j", "sell_starttime" => "$i-01-01 00:00:00", "sell_endtime" => "$i-12-31 23:59:59", ]; $filename = "${i}销售在2019-${j}月报表.xlsx"; $export = new CompanyYearReportExport($conditions); Excel::store($export, $filename, 'public'); $url = Storage::disk($disk)->url($filename); echo $url . PHP_EOL; } $conditions = [ "limit" => 0, "type" => [0, 1], "year" => "2020", "sell_starttime" => "$i-01-01 00:00:00", "sell_endtime" => "$i-12-31 23:59:59", ]; $filename = "${i}销售在2020年报表.xlsx"; $export = new CompanyYearReportExport($conditions); Excel::store($export, $filename, 'public'); $url = Storage::disk($disk)->url($filename); echo $url . PHP_EOL; }