|
1 | 1 | <?php |
2 | 2 |
|
| 3 | +declare(strict_types=1); |
| 4 | + |
3 | 5 | use Maatwebsite\Excel\Excel; |
4 | 6 |
|
5 | 7 | return [ |
|
14 | 16 | | Here you can specify how big the chunk should be. |
15 | 17 | | |
16 | 18 | */ |
17 | | - 'chunk_size' => 1000, |
| 19 | + 'chunk_size' => 1000, |
18 | 20 |
|
19 | 21 | /* |
20 | 22 | |-------------------------------------------------------------------------- |
|
41 | 43 | | Configure e.g. delimiter, enclosure and line ending for CSV exports. |
42 | 44 | | |
43 | 45 | */ |
44 | | - 'csv' => [ |
45 | | - 'delimiter' => ',', |
46 | | - 'enclosure' => '"', |
47 | | - 'line_ending' => PHP_EOL, |
48 | | - 'use_bom' => false, |
| 46 | + 'csv' => [ |
| 47 | + 'delimiter' => ',', |
| 48 | + 'enclosure' => '"', |
| 49 | + 'line_ending' => PHP_EOL, |
| 50 | + 'use_bom' => false, |
49 | 51 | 'include_separator_line' => false, |
50 | | - 'excel_compatibility' => false, |
51 | | - 'output_encoding' => '', |
52 | | - 'test_auto_detect' => true, |
| 52 | + 'excel_compatibility' => false, |
| 53 | + 'output_encoding' => '', |
| 54 | + 'test_auto_detect' => true, |
53 | 55 | ], |
54 | 56 |
|
55 | 57 | /* |
|
60 | 62 | | Configure e.g. default title, creator, subject,... |
61 | 63 | | |
62 | 64 | */ |
63 | | - 'properties' => [ |
64 | | - 'creator' => '', |
| 65 | + 'properties' => [ |
| 66 | + 'creator' => '', |
65 | 67 | 'lastModifiedBy' => '', |
66 | | - 'title' => '', |
67 | | - 'description' => '', |
68 | | - 'subject' => '', |
69 | | - 'keywords' => '', |
70 | | - 'category' => '', |
71 | | - 'manager' => '', |
72 | | - 'company' => '', |
| 68 | + 'title' => '', |
| 69 | + 'description' => '', |
| 70 | + 'subject' => '', |
| 71 | + 'keywords' => '', |
| 72 | + 'category' => '', |
| 73 | + 'manager' => '', |
| 74 | + 'company' => '', |
73 | 75 | ], |
74 | 76 | ], |
75 | 77 |
|
76 | | - 'imports' => [ |
| 78 | + 'imports' => [ |
77 | 79 |
|
78 | 80 | /* |
79 | 81 | |-------------------------------------------------------------------------- |
|
86 | 88 | | you can enable it by setting read_only to false. |
87 | 89 | | |
88 | 90 | */ |
89 | | - 'read_only' => true, |
| 91 | + 'read_only' => true, |
90 | 92 |
|
91 | 93 | /* |
92 | 94 | |-------------------------------------------------------------------------- |
|
110 | 112 | | Available options: none|slug|custom |
111 | 113 | | |
112 | 114 | */ |
113 | | - 'heading_row' => [ |
| 115 | + 'heading_row' => [ |
114 | 116 | 'formatter' => 'slug', |
115 | 117 | ], |
116 | 118 |
|
|
122 | 124 | | Configure e.g. delimiter, enclosure and line ending for CSV imports. |
123 | 125 | | |
124 | 126 | */ |
125 | | - 'csv' => [ |
126 | | - 'delimiter' => null, |
127 | | - 'enclosure' => '"', |
| 127 | + 'csv' => [ |
| 128 | + 'delimiter' => null, |
| 129 | + 'enclosure' => '"', |
128 | 130 | 'escape_character' => '\\', |
129 | | - 'contiguous' => false, |
130 | | - 'input_encoding' => 'UTF-8', |
| 131 | + 'contiguous' => false, |
| 132 | + 'input_encoding' => 'UTF-8', |
131 | 133 | ], |
132 | 134 |
|
133 | 135 | /* |
|
138 | 140 | | Configure e.g. default title, creator, subject,... |
139 | 141 | | |
140 | 142 | */ |
141 | | - 'properties' => [ |
142 | | - 'creator' => '', |
| 143 | + 'properties' => [ |
| 144 | + 'creator' => '', |
143 | 145 | 'lastModifiedBy' => '', |
144 | | - 'title' => '', |
145 | | - 'description' => '', |
146 | | - 'subject' => '', |
147 | | - 'keywords' => '', |
148 | | - 'category' => '', |
149 | | - 'manager' => '', |
150 | | - 'company' => '', |
| 146 | + 'title' => '', |
| 147 | + 'description' => '', |
| 148 | + 'subject' => '', |
| 149 | + 'keywords' => '', |
| 150 | + 'category' => '', |
| 151 | + 'manager' => '', |
| 152 | + 'company' => '', |
151 | 153 | ], |
152 | 154 |
|
153 | 155 | /* |
|
158 | 160 | | Configure middleware that is executed on getting a cell value |
159 | 161 | | |
160 | 162 | */ |
161 | | - 'cells' => [ |
| 163 | + 'cells' => [ |
162 | 164 | 'middleware' => [ |
163 | 165 | //\Maatwebsite\Excel\Middleware\TrimCellValue::class, |
164 | 166 | //\Maatwebsite\Excel\Middleware\ConvertEmptyCellValuesToNull::class, |
|
177 | 179 | | |
178 | 180 | */ |
179 | 181 | 'extension_detector' => [ |
180 | | - 'xlsx' => Excel::XLSX, |
181 | | - 'xlsm' => Excel::XLSX, |
182 | | - 'xltx' => Excel::XLSX, |
183 | | - 'xltm' => Excel::XLSX, |
184 | | - 'xls' => Excel::XLS, |
185 | | - 'xlt' => Excel::XLS, |
186 | | - 'ods' => Excel::ODS, |
187 | | - 'ots' => Excel::ODS, |
188 | | - 'slk' => Excel::SLK, |
189 | | - 'xml' => Excel::XML, |
| 182 | + 'xlsx' => Excel::XLSX, |
| 183 | + 'xlsm' => Excel::XLSX, |
| 184 | + 'xltx' => Excel::XLSX, |
| 185 | + 'xltm' => Excel::XLSX, |
| 186 | + 'xls' => Excel::XLS, |
| 187 | + 'xlt' => Excel::XLS, |
| 188 | + 'ods' => Excel::ODS, |
| 189 | + 'ots' => Excel::ODS, |
| 190 | + 'slk' => Excel::SLK, |
| 191 | + 'xml' => Excel::XML, |
190 | 192 | 'gnumeric' => Excel::GNUMERIC, |
191 | | - 'htm' => Excel::HTML, |
192 | | - 'html' => Excel::HTML, |
193 | | - 'csv' => Excel::CSV, |
194 | | - 'tsv' => Excel::TSV, |
| 193 | + 'htm' => Excel::HTML, |
| 194 | + 'html' => Excel::HTML, |
| 195 | + 'csv' => Excel::CSV, |
| 196 | + 'tsv' => Excel::TSV, |
195 | 197 |
|
196 | 198 | /* |
197 | 199 | |-------------------------------------------------------------------------- |
|
202 | 204 | | Available options: Excel::MPDF | Excel::TCPDF | Excel::DOMPDF |
203 | 205 | | |
204 | 206 | */ |
205 | | - 'pdf' => Excel::DOMPDF, |
| 207 | + 'pdf' => Excel::DOMPDF, |
206 | 208 | ], |
207 | 209 |
|
208 | 210 | /* |
|
222 | 224 | | [x] PhpOffice\PhpSpreadsheet\Cell\AdvancedValueBinder::class |
223 | 225 | | |
224 | 226 | */ |
225 | | - 'value_binder' => [ |
| 227 | + 'value_binder' => [ |
226 | 228 | 'default' => Maatwebsite\Excel\DefaultValueBinder::class, |
227 | 229 | ], |
228 | 230 |
|
229 | | - 'cache' => [ |
| 231 | + 'cache' => [ |
230 | 232 | /* |
231 | 233 | |-------------------------------------------------------------------------- |
232 | 234 | | Default cell caching driver |
|
243 | 245 | | Drivers: memory|illuminate|batch |
244 | 246 | | |
245 | 247 | */ |
246 | | - 'driver' => 'memory', |
| 248 | + 'driver' => 'memory', |
247 | 249 |
|
248 | 250 | /* |
249 | 251 | |-------------------------------------------------------------------------- |
|
255 | 257 | | Here you can tweak the memory limit to your liking. |
256 | 258 | | |
257 | 259 | */ |
258 | | - 'batch' => [ |
| 260 | + 'batch' => [ |
259 | 261 | 'memory_limit' => 60000, |
260 | 262 | ], |
261 | 263 |
|
|
271 | 273 | | at "null" it will use the default store. |
272 | 274 | | |
273 | 275 | */ |
274 | | - 'illuminate' => [ |
| 276 | + 'illuminate' => [ |
275 | 277 | 'store' => null, |
276 | 278 | ], |
277 | 279 |
|
|
307 | 309 | */ |
308 | 310 | 'transactions' => [ |
309 | 311 | 'handler' => 'db', |
310 | | - 'db' => [ |
| 312 | + 'db' => [ |
311 | 313 | 'connection' => null, |
312 | 314 | ], |
313 | 315 | ], |
|
325 | 327 | | and the create file (file). |
326 | 328 | | |
327 | 329 | */ |
328 | | - 'local_path' => storage_path('framework/cache/laravel-excel'), |
| 330 | + 'local_path' => storage_path('framework/cache/laravel-excel'), |
329 | 331 |
|
330 | 332 | /* |
331 | 333 | |-------------------------------------------------------------------------- |
|
337 | 339 | | If omitted the default permissions of the filesystem will be used. |
338 | 340 | | |
339 | 341 | */ |
340 | | - 'local_permissions' => [ |
| 342 | + 'local_permissions' => [ |
341 | 343 | // 'dir' => 0755, |
342 | 344 | // 'file' => 0644, |
343 | 345 | ], |
|
356 | 358 | | in conjunction with queued imports and exports. |
357 | 359 | | |
358 | 360 | */ |
359 | | - 'remote_disk' => 's3private', |
360 | | - 'remote_prefix' => 'laravel-excel-tmp', |
| 361 | + 'remote_disk' => 's3private', |
| 362 | + 'remote_prefix' => 'laravel-excel-tmp', |
361 | 363 |
|
362 | 364 | /* |
363 | 365 | |-------------------------------------------------------------------------- |
|
0 commit comments