|
3 | 3 | [](http://laravel.com)
|
4 | 4 | [](https://packagist.org/packages/yajra/laravel-datatables-export)
|
5 | 5 | [](https://travis-ci.org/yajra/laravel-datatables-export)
|
6 |
| -[](https://scrutinizer-ci.com/g/yajra/laravel-datatables-export/?branch=master) |
7 | 6 | [](https://packagist.org/packages/yajra/laravel-datatables-export)
|
8 | 7 | [](https://packagist.org/packages/yajra/laravel-datatables-export)
|
9 | 8 |
|
10 | 9 | This package is a plugin of [Laravel DataTables](https://github.com/yajra/laravel-datatables) for handling server-side exporting using Queue and Livewire.
|
11 | 10 |
|
12 | 11 | ## Requirements
|
| 12 | + |
13 | 13 | - [PHP >=7.4](http://php.net/)
|
14 | 14 | - [Laravel 8.x](https://github.com/laravel/framework)
|
| 15 | +- [Laravel Livewire](https://laravel-livewire.com/) |
15 | 16 | - [Laravel DataTables 9.x](https://github.com/yajra/laravel-datatables)
|
16 | 17 | - [jQuery DataTables v1.10.x](http://datatables.net/)
|
17 |
| -- [jQuery DataTables Buttons Extension](https://datatables.net/reference/button/) |
18 | 18 |
|
19 | 19 | ## Documentations
|
| 20 | + |
20 | 21 | - [Laravel DataTables Documentation](http://yajrabox.com/docs/laravel-datatables)
|
21 | 22 |
|
22 | 23 | ## NOTE
|
23 |
| -This version is still on experimental stage. Until Laravel DataTables v8.x stable version is released, |
24 |
| -there might be a breaking changes that may be included on future releases. |
| 24 | + |
| 25 | +This version is still on experimental stage. |
25 | 26 |
|
26 | 27 | ## Quick Installation
|
| 28 | + |
27 | 29 | `composer require yajra/laravel-datatables-export`
|
28 | 30 |
|
29 | 31 | #### Service Provider (Optional on Laravel 5.5)
|
| 32 | + |
30 | 33 | `Yajra\DataTables\ExportServiceProvider::class`
|
31 | 34 |
|
32 | 35 | #### Configuration and Assets (Optional)
|
| 36 | + |
33 | 37 | `$ php artisan vendor:publish --tag=datatables-export --force`
|
34 | 38 |
|
35 |
| -And that's it! Start building out some awesome DataTables! |
| 39 | +## Usage |
| 40 | + |
| 41 | +1. Add the export-button livewire component on your view file that uses dataTable class. |
| 42 | + |
| 43 | +```phpt |
| 44 | +<livewire:export-button :table-id="$dataTable->getTableAttribute('id')" /> |
| 45 | +``` |
| 46 | + |
| 47 | +2. On your `DataTable` class instance, use `WithExportQueue` |
| 48 | + |
| 49 | +```phpt |
| 50 | +use Yajra\DataTables\WithExportQueue; |
| 51 | + |
| 52 | +class PermissionsDataTable extends DataTable |
| 53 | +{ |
| 54 | + use WithExportQueue; |
| 55 | + |
| 56 | + ... |
| 57 | +} |
| 58 | +``` |
| 59 | + |
| 60 | +3. Run your queue worker via `php artisan queue:work`. |
36 | 61 |
|
37 | 62 | ## Contributing
|
38 | 63 |
|
|
0 commit comments