Skip to content

Commit 84575ed

Browse files
Update mapping.md
1 parent 28214a4 commit 84575ed

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

3.1/exports/mapping.md

+21
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,24 @@ class InvoicesExport implements FromQuery, WithHeadings
4848
}
4949
}
5050
```
51+
52+
If you need to have multiple heading rows, you can return multiple rows from the `headings()` method:
53+
54+
```
55+
```php
56+
57+
use Maatwebsite\Excel\Concerns\FromQuery;
58+
use Maatwebsite\Excel\Concerns\WithHeadings;
59+
60+
class InvoicesExport implements FromQuery, WithHeadings
61+
{
62+
public function headings(): array
63+
{
64+
return [
65+
['First row', 'First row']
66+
['Second row', 'Second row'],
67+
];
68+
}
69+
}
70+
```
71+
``

0 commit comments

Comments
 (0)