CompanyReportExport
This commit is contained in:
parent
a25e5c02ff
commit
aa88f1d0aa
@ -1,11 +1,22 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
use Carbon\Carbon;
|
||||||
|
use App\Domains\Export\Services\ExportService;
|
||||||
|
use App\Domains\Stats\Exports\CompanyReportExport;
|
||||||
|
|
||||||
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
||||||
|
|
||||||
$conditions = [
|
$conditions = [
|
||||||
'company_name' = '福建车媒通网络科技有限公司',
|
'company_name' => '福建车媒通网络科技有限公司',
|
||||||
'month' = '2016-01'
|
'month' => '2016-01'
|
||||||
]
|
];
|
||||||
|
|
||||||
|
$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);
|
$export = new CompanyReportExport($conditions);
|
||||||
$url = ExportService::store($export, $this->disk);
|
$url = ExportService::store($export, $this->disk);
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user