123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- /**
- * Created by PhpStorm.
- * User: Administrator
- * Date: 2019/9/24 0024
- * Time: 13:38
- */
- namespace App\Exports;
- use Maatwebsite\Excel\Concerns\FromArray;
- use Maatwebsite\Excel\Concerns\Exportable;
- use Maatwebsite\Excel\Events\AfterSheet;
- use Maatwebsite\Excel\Concerns\ShouldAutoSize;
- use Maatwebsite\Excel\Concerns\WithEvents;
- class LinkCountExport implements FromArray,ShouldAutoSize,WithEvents
- {
- use Exportable;
- public $dataList;
- public function __construct(array $dataList)
- {
- $this->dataList = $dataList;
- }
- public function array(): array
- {
- return $this->dataList;
- }
- //
- public function registerEvents(): array
- {
- return [
- // AfterSheet::class => function (AfterSheet $event) {
- // $event->sheet->getDelegate()->mergeCells('A1:B1');
- // }
- ];
- }
- }
|