export = $export; $this->show = array_keys($cols); $this->head = array_values($cols); } public function collection() { return $this->export->map(function ($value, $key) { $exp = []; $all = $value->toArray(); foreach ($this->show as $val) { $exp[$val] = Arr::get($all, $val); } return collect($exp); }); } public function registerEvents(): array { return [ AfterSheet::class => function (AfterSheet $event) { $event->sheet->getDelegate()->setRightToLeft(true); }, ]; } /** * @inheritDoc */ public function headings(): array { return $this->head; } }