datatables-export.php 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <?php
  2. use PhpOffice\PhpSpreadsheet\Style\NumberFormat;
  3. return [
  4. /*
  5. |--------------------------------------------------------------------------
  6. | Method
  7. |--------------------------------------------------------------------------
  8. |
  9. | Method to use to iterate with the query results.
  10. | Options: lazy, cursor
  11. |
  12. | @link https://laravel.com/docs/eloquent#cursors
  13. | @link https://laravel.com/docs/eloquent#chunking-using-lazy-collections
  14. |
  15. */
  16. 'method' => 'lazy',
  17. /*
  18. |--------------------------------------------------------------------------
  19. | Chunk Size
  20. |--------------------------------------------------------------------------
  21. |
  22. | Chunk size to be used when using lazy method.
  23. |
  24. */
  25. 'chunk' => 1000,
  26. /*
  27. |--------------------------------------------------------------------------
  28. | Export filesystem disk
  29. |--------------------------------------------------------------------------
  30. |
  31. | Export filesystem disk where generated files will be stored.
  32. |
  33. */
  34. 'disk' => 'local',
  35. /*
  36. |--------------------------------------------------------------------------
  37. | Use S3 for final file destination
  38. |--------------------------------------------------------------------------
  39. |
  40. | After generating the file locally, it can be uploaded to s3.
  41. |
  42. */
  43. 's3_disk' => '',
  44. /*
  45. |--------------------------------------------------------------------------
  46. | Mail from address
  47. |--------------------------------------------------------------------------
  48. |
  49. | Will be used to email report from this address.
  50. |
  51. */
  52. 'mail_from' => env('MAIL_FROM_ADDRESS', ''),
  53. /*
  54. |--------------------------------------------------------------------------
  55. | Default Date Format
  56. |--------------------------------------------------------------------------
  57. |
  58. | Default export format for date.
  59. |
  60. */
  61. 'default_date_format' => 'yyyy-mm-dd',
  62. /*
  63. |--------------------------------------------------------------------------
  64. | Valid Date Formats
  65. |--------------------------------------------------------------------------
  66. |
  67. | List of valid date formats to be used for auto-detection.
  68. |
  69. */
  70. 'date_formats' => [
  71. 'mm/dd/yyyy',
  72. ...NumberFormat::DATE_TIME_OR_DATETIME_ARRAY,
  73. ...NumberFormat::TIME_OR_DATETIME_ARRAY,
  74. ],
  75. /*
  76. |--------------------------------------------------------------------------
  77. | Valid Text Formats
  78. |--------------------------------------------------------------------------
  79. |
  80. | List of valid text formats to be used.
  81. |
  82. */
  83. 'text_formats' => [
  84. NumberFormat::FORMAT_TEXT,
  85. NumberFormat::FORMAT_GENERAL,
  86. ],
  87. /*
  88. |--------------------------------------------------------------------------
  89. | Purge Options
  90. |--------------------------------------------------------------------------
  91. |
  92. | Purge all exported by purge.days old files.
  93. |
  94. */
  95. 'purge' => [
  96. 'days' => 1,
  97. ],
  98. ];