year = $year; } public function sheets(): array { $sheets = []; $sheets[] = new ContractsSheet($this->year); $sheets[] = new BuyContractsSheet($this->year); $sheets[] = new SellContractsSheet($this->year); return $sheets; } public function collection() { return Contract::whereYear('date', '=', $this->year)->orderBy('date', 'asc')->get(); } }