Skip to content

Commit 75e6906

Browse files
committed
docs: version matrix
1 parent 98aec87 commit 75e6906

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

README.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
[![Total Downloads](https://img.shields.io/packagist/dt/yajra/laravel-datatables-export.svg)](https://packagist.org/packages/yajra/laravel-datatables-export)
88
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://packagist.org/packages/yajra/laravel-datatables-export)
99

10-
This package is a plugin of [Laravel DataTables](https://github.com/yajra/laravel-datatables) for handling server-side exporting using Queue, OpenSpout and Livewire.
10+
This package is a plugin of [Laravel DataTables](https://github.com/yajra/laravel-datatables) for handling server-side
11+
exporting using Queue, OpenSpout and Livewire.
1112

1213
## Requirements
1314

@@ -22,6 +23,14 @@ This package is a plugin of [Laravel DataTables](https://github.com/yajra/larave
2223

2324
- [Laravel DataTables Documentation](http://yajrabox.com/docs/laravel-datatables)
2425

26+
## Laravel Version Compatibility
27+
28+
| Laravel | Package |
29+
|:--------|:--------|
30+
| 8.x | 0.x |
31+
| 9.x | 1.x |
32+
| 10.x | 10.x |
33+
2534
## Quick Installation
2635

2736
`composer require yajra/laravel-datatables-export`
@@ -46,7 +55,8 @@ php artisan migrate
4655
1. Add the export-button livewire component on your view file that uses dataTable class.
4756

4857
```html
49-
<livewire:export-button :table-id="$dataTable->getTableId()" />
58+
59+
<livewire:export-button :table-id="$dataTable->getTableId()"/>
5060
```
5161

5262
2. On your `DataTable` class, use `WithExportQueue`
@@ -77,27 +87,30 @@ $schedule->command('datatables:purge-export')->weekly();
7787
You can set the export filename by setting the property.
7888

7989
```html
80-
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.xlsx" />
81-
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.csv" />
8290

83-
<livewire:export-button :table-id="$dataTable->getTableId()" :filename="$filename" />
91+
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.xlsx"/>
92+
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.csv"/>
93+
94+
<livewire:export-button :table-id="$dataTable->getTableId()" :filename="$filename"/>
8495
```
8596

8697
## Export Type
8798

8899
You can set the export type by setting the property to `csv` or `xlsx`. Default value is `xlsx`.
89100

90101
```html
91-
<livewire:export-button :table-id="$dataTable->getTableId()" type="xlsx" />
92-
<livewire:export-button :table-id="$dataTable->getTableId()" type="csv" />
102+
103+
<livewire:export-button :table-id="$dataTable->getTableId()" type="xlsx"/>
104+
<livewire:export-button :table-id="$dataTable->getTableId()" type="csv"/>
93105
```
94106

95107
## Set Excel Sheet Name
96108

97-
Option 1: You can set the Excel sheet name by setting the property.
109+
Option 1: You can set the Excel sheet name by setting the property.
98110

99111
```html
100-
<livewire:export-button :table-id="$dataTable->getTableId()" sheet-name="Monthly Report" />
112+
113+
<livewire:export-button :table-id="$dataTable->getTableId()" sheet-name="Monthly Report"/>
101114
```
102115

103116
Option 2: You can also set the Excel sheet name by overwriting the method.
@@ -185,16 +198,19 @@ Column::make('id')->exportFormat(NumberFormat::FORMAT_TEXT),
185198
Option to automatically download the exported file.
186199

187200
```html
201+
188202
<livewire:export-button :table-id="$dataTable->getTableId()" filename="my-table.xlsx" auto-download="true"/>
189203
```
190204

191205
## Contributing
192206

193-
Please see [CONTRIBUTING](https://github.com/yajra/laravel-datatables-export/blob/master/.github/CONTRIBUTING.md) for details.
207+
Please see [CONTRIBUTING](https://github.com/yajra/laravel-datatables-export/blob/master/.github/CONTRIBUTING.md) for
208+
details.
194209

195210
## Security
196211

197-
If you discover any security related issues, please email [[email protected]](mailto:[email protected]) instead of using the issue tracker.
212+
If you discover any security related issues, please email [[email protected]](mailto:[email protected]) instead of
213+
using the issue tracker.
198214

199215
## Credits
200216

@@ -204,4 +220,5 @@ If you discover any security related issues, please email [[email protected]](
204220

205221
## License
206222

207-
The MIT License (MIT). Please see [License File](https://github.com/yajra/laravel-datatables-export/blob/master/LICENSE.md) for more information.
223+
The MIT License (MIT). Please
224+
see [License File](https://github.com/yajra/laravel-datatables-export/blob/master/LICENSE.md) for more information.

0 commit comments

Comments
 (0)