From aa88f1d0aa12b0ee36442f773372fa4d5f6ada78 Mon Sep 17 00:00:00 2001 From: denghy Date: Mon, 12 Aug 2019 14:36:33 +0800 Subject: [PATCH] CompanyReportExport --- tests/ExampleTest.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php index 55f68baa..6f072b63 100644 --- a/tests/ExampleTest.php +++ b/tests/ExampleTest.php @@ -1,11 +1,22 @@ '福建车媒通网络科技有限公司', + 'month' => '2016-01' +]; -$export = new CompanyReportExport($conditions); -$url = ExportService::store($export, $this->disk); +$start = Carbon::parse('2016-01')->startOfMonth(); +$end = Carbon::parse('2019-07')->endOfMonth(); + +for ($i = 0; $i <= $end->diffInMonths($start); $i++) { + $month = $start->copy()->addMonths($i)->format('Y-m'); + $conditions['month'] = $month; + $export = new CompanyReportExport($conditions); + $url = ExportService::store($export, $this->disk); +}