35 lines
1.4 KiB
PHP
35 lines
1.4 KiB
PHP
<?php
|
|
|
|
namespace App\Exports\RoadDanger;
|
|
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
use App\Exports\RoadDanger\AccidentHotspotProjectsSheet;
|
|
use App\Exports\RoadDanger\summaryAccidentPerformanceProvince;
|
|
use App\Exports\RoadDanger\summaryAccidentPerformanceCity;
|
|
use App\Exports\RoadDanger\summaryAccidentPerformanceProject;
|
|
use App\Exports\RoadDanger\CompareProgramAndFunction;
|
|
|
|
|
|
class allSheet implements WithMultipleSheets
|
|
{
|
|
public function __construct($fromDate = null, $toDate = null, $province = null, $last_status_id = null)
|
|
{
|
|
$this->fromDate = $fromDate ?? null;
|
|
$this->toDate = $toDate ?? null;
|
|
$this->province = $province ?? null;
|
|
$this->last_status_id = $last_status_id ?? null;
|
|
}
|
|
|
|
public function sheets(): array
|
|
{
|
|
return [
|
|
0 => new AccidentHotspotProjectsSheet($this->fromDate, $this->toDate, $this->province, $this->last_status_id),
|
|
1 => new summaryAccidentPerformanceProvince($this->fromDate, $this->toDate, $this->province, $this->last_status_id),
|
|
2 => new summaryAccidentPerformanceCity($this->fromDate, $this->toDate, $this->province, $this->last_status_id),
|
|
3 => new summaryAccidentPerformanceProject($this->fromDate, $this->toDate, $this->province, $this->last_status_id),
|
|
4 => new CompareProgramAndFunction($this->fromDate, $this->toDate, $this->province, $this->last_status_id)
|
|
];
|
|
}
|
|
|
|
}
|