File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -113,11 +113,13 @@ public function handle()
113113 }
114114
115115 $ columns = $ this ->getExportableColumns ($ oTable );
116- $ writer ->addRow (
117- Row::fromValues (
118- $ columns ->map (fn (Column $ column ) => strip_tags ($ column ->title ))->toArray ()
119- )
120- );
116+ $ headers = [];
117+
118+ $ columns ->each (function (Column $ column ) use (&$ headers ) {
119+ $ headers [] = strip_tags ($ column ->title );
120+ });
121+
122+ $ writer ->addRow (Row::fromValues ($ headers ));
121123
122124 if ($ this ->usesLazyMethod ()) {
123125 $ chunkSize = intval (config ('datatables-export.chunk ' , 1000 ));
@@ -145,7 +147,7 @@ public function handle()
145147 $ property = $ property ['_ ' ] ?? $ column ->name ;
146148 }
147149
148- /** @var array|bool|int|string|null $value */
150+ /** @var array|bool|int|string|null|DateTimeInterface $value */
149151 $ value = $ row [$ property ] ?? '' ;
150152
151153 if (is_array ($ value )) {
You can’t perform that action at this time.
0 commit comments