datatables.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <?php
  2. return [
  3. /**
  4. * DataTables search options.
  5. */
  6. 'search' => [
  7. /**
  8. * Smart search will enclose search keyword with wildcard string "%keyword%".
  9. * SQL: column LIKE "%keyword%"
  10. */
  11. 'smart' => true,
  12. /**
  13. * Case insensitive will search the keyword in lower case format.
  14. * SQL: LOWER(column) LIKE LOWER(keyword)
  15. */
  16. 'case_insensitive' => true,
  17. /**
  18. * Wild card will add "%" in between every characters of the keyword.
  19. * SQL: column LIKE "%k%e%y%w%o%r%d%"
  20. */
  21. 'use_wildcards' => false,
  22. ],
  23. /**
  24. * DataTables fractal configurations.
  25. */
  26. 'fractal' => [
  27. /**
  28. * Request key name to parse includes on fractal.
  29. */
  30. 'includes' => 'include',
  31. /**
  32. * Default fractal serializer.
  33. */
  34. 'serializer' => 'League\Fractal\Serializer\DataArraySerializer',
  35. ],
  36. /**
  37. * DataTables script view template.
  38. */
  39. 'script_template' => 'datatables::script',
  40. /**
  41. * DataTables internal index id response column name.
  42. */
  43. 'index_column' => 'DT_Row_Index',
  44. /**
  45. * Namespaces used by the generator.
  46. */
  47. 'namespace' => [
  48. /**
  49. * Base namespace/directory to create the new file.
  50. * This is appended on default Laravel namespace.
  51. * Usage: php artisan datatables:make User
  52. * Output: App\DataTables\UserDataTable
  53. * With Model: App\User (default model)
  54. * Export filename: users_timestamp
  55. */
  56. 'base' => 'DataTables',
  57. /**
  58. * Base namespace/directory where your model's are located.
  59. * This is appended on default Laravel namespace.
  60. * Usage: php artisan datatables:make Post --model
  61. * Output: App\DataTables\PostDataTable
  62. * With Model: App\Post
  63. * Export filename: posts_timestamp
  64. */
  65. 'model' => '',
  66. ],
  67. /**
  68. * PDF generator to be used when converting the table to pdf.
  69. * Available generators: excel, snappy
  70. * Snappy package: barryvdh/laravel-snappy
  71. * Excel package: maatwebsite/excel
  72. */
  73. 'pdf_generator' => 'excel',
  74. /**
  75. * Snappy PDF options.
  76. */
  77. 'snappy' => [
  78. 'options' => [
  79. 'no-outline' => true,
  80. 'margin-left' => '0',
  81. 'margin-right' => '0',
  82. 'margin-top' => '10mm',
  83. 'margin-bottom' => '10mm',
  84. ],
  85. 'orientation' => 'landscape',
  86. ],
  87. /**
  88. * JsonResponse header and options config.
  89. */
  90. 'json' => [
  91. 'header' => [],
  92. 'options' => 0,
  93. ],
  94. ];