Dashboard sipadu mbip
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

EnforcerStatisticExport.php 708B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace App\Exports;
  3. use App\Compound;
  4. use Maatwebsite\Excel\Concerns\Exportable;
  5. use Maatwebsite\Excel\Concerns\WithMultipleSheets;
  6. class EnforcerStatisticExport implements WithMultipleSheets
  7. {
  8. use Exportable;
  9. private $dataK, $year;
  10. public function __construct($dataK, $dataJ, $year)
  11. {
  12. $this->dataK = $dataK;
  13. $this->dataJ = $dataJ;
  14. $this->year = $year;
  15. }
  16. /**
  17. * @return array
  18. */
  19. public function sheets(): array
  20. {
  21. $sheets = [];
  22. $sheets[] = new EnforcerStatisticSheet($this->dataK, $this->year, 'KEPING');
  23. $sheets[] = new EnforcerStatisticSheet($this->dataJ, $this->year, 'JUMLAH');
  24. return $sheets;
  25. }
  26. }