automngr/app/Exports/ContractsExport.php

27 lines
508 B
PHP

<?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
class ContractsExport implements WithMultipleSheets
{
protected $year;
public function __construct(int $year)
{
$this->year = $year;
}
public function sheets(): array
{
$sheets = [];
$sheets[] = new ContractsSheet($this->year);
$sheets[] = new BuyContractsSheet($this->year);
$sheets[] = new SellContractsSheet($this->year);
return $sheets;
}
}