| 1234567891011121314151617181920212223242526272829303132 |
- <?php
-
- namespace App\Exports;
-
- use App\Compound;
- use Maatwebsite\Excel\Concerns\Exportable;
- use Maatwebsite\Excel\Concerns\WithMultipleSheets;
-
- class EnforcerStatisticExport implements WithMultipleSheets
- {
- use Exportable;
-
- private $dataK, $year;
-
- public function __construct($dataK, $dataJ, $year)
- {
- $this->dataK = $dataK;
- $this->dataJ = $dataJ;
- $this->year = $year;
- }
-
- /**
- * @return array
- */
- public function sheets(): array
- {
- $sheets = [];
- $sheets[] = new EnforcerStatisticSheet($this->dataK, $this->year, 'KEPING');
- $sheets[] = new EnforcerStatisticSheet($this->dataJ, $this->year, 'JUMLAH');
- return $sheets;
- }
- }
|