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()
113
113
}
114
114
115
115
$ 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 ));
121
123
122
124
if ($ this ->usesLazyMethod ()) {
123
125
$ chunkSize = intval (config ('datatables-export.chunk ' , 1000 ));
@@ -145,7 +147,7 @@ public function handle()
145
147
$ property = $ property ['_ ' ] ?? $ column ->name ;
146
148
}
147
149
148
- /** @var array|bool|int|string|null $value */
150
+ /** @var array|bool|int|string|null|DateTimeInterface $value */
149
151
$ value = $ row [$ property ] ?? '' ;
150
152
151
153
if (is_array ($ value )) {
You can’t perform that action at this time.
0 commit comments