Buttons Configurations
Artisan Console Configurations
Namespace configuration is used by the datatables command generator.
'namespace' => [ 'base' => 'DataTables', 'model' => '',],
DataTable Base Namespace/Directory
This is the base namespace/directory to be created when a new DataTable was called. This directory is appended on default Laravel namespace.
Usage:
php artisan datatables:make User
Output:
App\DataTables\UserDataTable
Export filename: users_(timestamp)
Model Option
This is the base namespace/directory where your model's are located.
This directory is appended on default Laravel namespace.
Usage: php artisan datatables:make Post --model
Output: App\DataTables\PostDataTable
With Model: App\Post`` **Export filename:**
posts_(timestamp)```
PDF Generator
Set the PDF generator to be used when converting your dataTable to pdf.
Available generators are: excel
, snappy
Excel Generator (Default Generator)
When excel
is used as the generator, the package will use maatwebsite/excel
to generate the PDF.
To export files to pdf, you will have to include "dompdf/dompdf": "~0.6.1", "mpdf/mpdf": "~5.7.3" or "tecnick.com/tcpdf": "~6.0.0" in your composer.json and change the export.pdf.driver config setting accordingly.
Snappy Generator
When snappy
is used as the generator, you need to install barryvdh/laravel-snappy
Snappy PDF Options
These are the options passed to laravel-snappy
when exporting the pdf file.
'snappy' => [ 'options' => [ 'no-outline' => true, 'margin-left' => '0', 'margin-right' => '0', 'margin-top' => '10mm', 'margin-bottom' => '10mm', ], 'orientation' => 'landscape',],