2024-08-07 18:29:23 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Exports;
|
|
|
|
|
|
|
|
|
|
use App\Exports\Sheets\DailyChangesSheet;
|
|
|
|
|
use App\Exports\Sheets\PortfoliosSheet;
|
|
|
|
|
use App\Exports\Sheets\TransactionsSheet;
|
|
|
|
|
use Maatwebsite\Excel\Concerns\Exportable;
|
|
|
|
|
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
|
|
|
|
|
|
|
|
|
|
class BackupExport implements WithMultipleSheets
|
|
|
|
|
{
|
|
|
|
|
use Exportable;
|
|
|
|
|
|
2024-08-29 23:36:44 -05:00
|
|
|
public function __construct(
|
|
|
|
|
public bool $empty = false
|
2025-01-28 17:14:49 -06:00
|
|
|
) {}
|
2024-08-29 23:36:44 -05:00
|
|
|
|
2024-08-07 18:29:23 -05:00
|
|
|
public function sheets(): array
|
|
|
|
|
{
|
2025-01-28 17:14:49 -06:00
|
|
|
return [
|
|
|
|
|
new PortfoliosSheet($this->empty),
|
|
|
|
|
new TransactionsSheet($this->empty),
|
|
|
|
|
new DailyChangesSheet($this->empty),
|
|
|
|
|
];
|
2024-08-07 18:29:23 -05:00
|
|
|
}
|
|
|
|
|
}
|