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