25 lines
702 B
PHP
25 lines
702 B
PHP
<?php
|
|
|
|
use Carbon\Carbon;
|
|
use App\Domains\Export\Services\ExportService;
|
|
use App\Domains\Stats\Exports\CompanyReportExport;
|
|
|
|
require_once realpath(dirname(__FILE__) . '/TestCase.php');
|
|
|
|
$conditions = [
|
|
'type' => [0, 1],
|
|
'company_name' => '福建车媒通网络科技有限公司',
|
|
'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;
|
|
echo $month . PHP_EOL;
|
|
$export = new CompanyReportExport($conditions);
|
|
$url = ExportService::store($export, $this->disk);
|
|
}
|