Path : /var/www/html/thb_loan_system/app/Exports/ |
B-Con CMD Config cPanel C-Rdp D-Log Info Jump Mass Ransom Symlink vHost Zone-H |
Current File : /var/www/html/thb_loan_system/app/Exports/ReportBalanceSheet.php |
<?php namespace App\Exports; use Illuminate\Support\Collection; use Maatwebsite\Excel\Concerns\FromCollection; use Maatwebsite\Excel\Concerns\WithEvents; use Maatwebsite\Excel\Events\AfterSheet; class ReportBalanceSheet implements FromCollection, WithEvents { public function __construct(public $data) { } /** * @return Collection */ public function collection(): Collection { return collect($this->data); } public function registerEvents(): array { return [ AfterSheet::class => function(AfterSheet $event){ $event->sheet->getDelegate()->mergeCells('A1:C1'); $event->sheet->getDelegate()->mergeCells('A3:C3'); $event->sheet->getDelegate()->mergeCells('A10:C10'); } ]; } }