| 1234567891011121314151617181920212223242526 |
- <?php
- namespace App\Exports;
- use Maatwebsite\Excel\Concerns\WithMultipleSheets;
- class ResearchProjectDetailMultiExport implements WithMultipleSheets
- {
- protected $year;
- protected $projects;
- protected $taxInfo;
- public function __construct($year, array $projects, array $taxInfo) {
- $this->year = $year;
- $this->projects = $projects;
- $this->taxInfo = $taxInfo;
- }
- public function sheets(): array {
- $sheets = [];
- foreach ($this->projects as $project) {
- $sheets[] = new ResearchProjectDetailSheetExport($this->year, $project, $this->taxInfo);
- }
- return $sheets;
- }
- }
|