|
| 1 | +# Buttons Configurations |
| 2 | + |
| 3 | +```php |
| 4 | +return [ |
| 5 | + /** |
| 6 | + * DataTables script view template. |
| 7 | + */ |
| 8 | + 'script_template' => 'datatables::script', |
| 9 | + |
| 10 | + /** |
| 11 | + * Namespaces used by the generator. |
| 12 | + */ |
| 13 | + 'namespace' => [ |
| 14 | + /** |
| 15 | + * Base namespace/directory to create the new file. |
| 16 | + * This is appended on default Laravel namespace. |
| 17 | + * Usage: php artisan datatables:make User |
| 18 | + * Output: App\DataTables\UserDataTable |
| 19 | + * With Model: App\User (default model) |
| 20 | + * Export filename: users_timestamp |
| 21 | + */ |
| 22 | + 'base' => 'DataTables', |
| 23 | + |
| 24 | + /** |
| 25 | + * Base namespace/directory where your model's are located. |
| 26 | + * This is appended on default Laravel namespace. |
| 27 | + * Usage: php artisan datatables:make Post --model |
| 28 | + * Output: App\DataTables\PostDataTable |
| 29 | + * With Model: App\Post |
| 30 | + * Export filename: posts_timestamp |
| 31 | + */ |
| 32 | + 'model' => '', |
| 33 | + ], |
| 34 | + |
| 35 | + /** |
| 36 | + * PDF generator to be used when converting the table to pdf. |
| 37 | + * Available generators: excel, snappy |
| 38 | + * Snappy package: barryvdh/laravel-snappy |
| 39 | + * Excel package: maatwebsite/excel |
| 40 | + */ |
| 41 | + 'pdf_generator' => 'excel', |
| 42 | + |
| 43 | + /** |
| 44 | + * Snappy PDF options. |
| 45 | + */ |
| 46 | + 'snappy' => [ |
| 47 | + 'options' => [ |
| 48 | + 'no-outline' => true, |
| 49 | + 'margin-left' => '0', |
| 50 | + 'margin-right' => '0', |
| 51 | + 'margin-top' => '10mm', |
| 52 | + 'margin-bottom' => '10mm', |
| 53 | + ], |
| 54 | + 'orientation' => 'landscape', |
| 55 | + ], |
| 56 | +]; |
| 57 | +``` |
0 commit comments