| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
-
- namespace App\Exports;
-
- use App\Compound;
- use Maatwebsite\Excel\Concerns\Exportable;
- use Maatwebsite\Excel\Concerns\WithMultipleSheets;
-
- class FaultyStatisticExport implements WithMultipleSheets
- {
- use Exportable;
-
- private $jan,$feb,$mac,$apr,$mei,$jun,$july,$ogos,$sept,$okt,$nov,$dis,$all,$start_date,$end_date;
-
- public function __construct($jan,$feb,$mac,$apr,$mei,$jun,$july,$ogos,$sept,$okt,$nov,$dis,$all,$start_date,$end_date)
- {
- $this->jan = $jan;
- $this->feb = $feb;
- $this->mac = $mac;
- $this->apr = $apr;
- $this->mei = $mei;
- $this->jun = $jun;
- $this->july = $july;
- $this->ogos = $ogos;
- $this->sept = $sept;
- $this->okt = $okt;
- $this->nov = $nov;
- $this->dis = $dis;
- $this->all = $all;
- $this->start_date = $start_date;
- $this->end_date = $end_date;
- }
-
- /**
- * @return array
- */
- public function sheets(): array
- {
- $sheets = [];
- $sheets[] = new FaultyStatisticSheet($this->jan, '01', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->feb, '02', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->mac, '03', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->apr, '04', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->mei, '05', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->jun, '06', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->july,'07', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->ogos,'08', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->sept,'09', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->okt, '10', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->nov, '11', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->dis, '12', $this->start_date, $this->end_date);
- $sheets[] = new FaultyStatisticSheet($this->all, 'All', $this->start_date, $this->end_date);
- return $sheets;
- }
- }
|