datatables-buttons.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?php
  2. return [
  3. /*
  4. * Namespaces used by the generator.
  5. */
  6. 'namespace' => [
  7. /*
  8. * Base namespace/directory to create the new file.
  9. * This is appended on default Laravel namespace.
  10. * Usage: php artisan datatables:make User
  11. * Output: App\DataTables\UserDataTable
  12. * With Model: App\User (default model)
  13. * Export filename: users_timestamp
  14. */
  15. 'base' => 'DataTables',
  16. /*
  17. * Base namespace/directory where your model's are located.
  18. * This is appended on default Laravel namespace.
  19. * Usage: php artisan datatables:make Post --model
  20. * Output: App\DataTables\PostDataTable
  21. * With Model: App\Post
  22. * Export filename: posts_timestamp
  23. */
  24. 'model' => 'App\\Models',
  25. ],
  26. /*
  27. * Set Custom stub folder
  28. */
  29. // 'stub' => '/resources/custom_stub',
  30. /*
  31. * PDF generator to be used when converting the table to pdf.
  32. * Available generators: excel, snappy
  33. * Snappy package: barryvdh/laravel-snappy
  34. * Excel package: maatwebsite/excel
  35. */
  36. 'pdf_generator' => 'snappy',
  37. /*
  38. * Snappy PDF options.
  39. */
  40. 'snappy' => [
  41. 'options' => [
  42. 'no-outline' => true,
  43. 'margin-left' => '0',
  44. 'margin-right' => '0',
  45. 'margin-top' => '10mm',
  46. 'margin-bottom' => '10mm',
  47. ],
  48. 'orientation' => 'landscape',
  49. ],
  50. /*
  51. * Default html builder parameters.
  52. */
  53. 'parameters' => [
  54. 'dom' => 'Bfrtip',
  55. 'order' => [[0, 'desc']],
  56. 'buttons' => [
  57. 'excel',
  58. 'csv',
  59. 'pdf',
  60. 'print',
  61. 'reset',
  62. 'reload',
  63. ],
  64. ],
  65. /*
  66. * Generator command default options value.
  67. */
  68. 'generator' => [
  69. /*
  70. * Default columns to generate when not set.
  71. */
  72. 'columns' => 'id,add your columns,created_at,updated_at',
  73. /*
  74. * Default buttons to generate when not set.
  75. */
  76. 'buttons' => 'excel,csv,pdf,print,reset,reload',
  77. /*
  78. * Default DOM to generate when not set.
  79. */
  80. 'dom' => 'Bfrtip',
  81. ],
  82. ];