Files
backend/app/Exports/DailyAccident/AllSheets.php
2024-02-01 09:53:53 +00:00

27 lines
607 B
PHP

<?php
namespace App\Exports\DailyAccident;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
use App\Exports\DailyAccident\ReceiptProvinceReport;
class AllSheets implements WithMultipleSheets
{
public function __construct($fromDate = null, $toDate = null, $province = null)
{
$this->fromDate = $fromDate ?? null;
$this->toDate = $toDate ?? null;
$this->province = $province ?? null;
}
public function sheets(): array
{
return [
0 => new ProvinceDailyAccidentReport($this->fromDate, $this->toDate, $this->province),
];
}
}