livewire.php 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. return [
  3. /*
  4. |---------------------------------------------------------------------------
  5. | Class Namespace
  6. |---------------------------------------------------------------------------
  7. |
  8. | This value sets the root class namespace for Livewire component classes in
  9. | your application. This value will change where component auto-discovery
  10. | finds components. It's also referenced by the file creation commands.
  11. |
  12. */
  13. 'class_namespace' => 'App\\Livewire',
  14. /*
  15. |---------------------------------------------------------------------------
  16. | View Path
  17. |---------------------------------------------------------------------------
  18. |
  19. | This value is used to specify where Livewire component Blade templates are
  20. | stored when running file creation commands like `artisan make:livewire`.
  21. | It is also used if you choose to omit a component's render() method.
  22. |
  23. */
  24. 'view_path' => resource_path('views/livewire'),
  25. /*
  26. |---------------------------------------------------------------------------
  27. | Layout
  28. |---------------------------------------------------------------------------
  29. | The view that will be used as the layout when rendering a single component
  30. | as an entire page via `Route::get('/post/create', CreatePost::class);`.
  31. | In this case, the view returned by CreatePost will render into $slot.
  32. |
  33. */
  34. 'layout' => 'components.layouts.app',
  35. /*
  36. |---------------------------------------------------------------------------
  37. | Lazy Loading Placeholder
  38. |---------------------------------------------------------------------------
  39. | Livewire allows you to lazy load components that would otherwise slow down
  40. | the initial page load. Every component can have a custom placeholder or
  41. | you can define the default placeholder view for all components below.
  42. |
  43. */
  44. 'lazy_placeholder' => null,
  45. /*
  46. |---------------------------------------------------------------------------
  47. | Temporary File Uploads
  48. |---------------------------------------------------------------------------
  49. |
  50. | Livewire handles file uploads by storing uploads in a temporary directory
  51. | before the file is stored permanently. All file uploads are directed to
  52. | a global endpoint for temporary storage. You may configure this below:
  53. |
  54. */
  55. 'temporary_file_upload' => [
  56. 'disk' => null, // Example: 'local', 's3' | Default: 'default'
  57. 'rules' => 'max:512000', // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
  58. 'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
  59. 'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
  60. 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
  61. 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
  62. 'mov', 'avi', 'wmv', 'mp3', 'm4a',
  63. 'jpg', 'jpeg', 'mpga', 'webp', 'wma',
  64. ],
  65. 'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
  66. 'cleanup' => true, // Should cleanup temporary uploads older than 24 hrs...
  67. ],
  68. /*
  69. |---------------------------------------------------------------------------
  70. | Render On Redirect
  71. |---------------------------------------------------------------------------
  72. |
  73. | This value determines if Livewire will run a component's `render()` method
  74. | after a redirect has been triggered using something like `redirect(...)`
  75. | Setting this to true will render the view once more before redirecting
  76. |
  77. */
  78. 'render_on_redirect' => false,
  79. /*
  80. |---------------------------------------------------------------------------
  81. | Eloquent Model Binding
  82. |---------------------------------------------------------------------------
  83. |
  84. | Previous versions of Livewire supported binding directly to eloquent model
  85. | properties using wire:model by default. However, this behavior has been
  86. | deemed too "magical" and has therefore been put under a feature flag.
  87. |
  88. */
  89. 'legacy_model_binding' => false,
  90. /*
  91. |---------------------------------------------------------------------------
  92. | Auto-inject Frontend Assets
  93. |---------------------------------------------------------------------------
  94. |
  95. | By default, Livewire automatically injects its JavaScript and CSS into the
  96. | <head> and <body> of pages containing Livewire components. By disabling
  97. | this behavior, you need to use @livewireStyles and @livewireScripts.
  98. |
  99. */
  100. 'inject_assets' => true,
  101. /*
  102. |---------------------------------------------------------------------------
  103. | Navigate (SPA mode)
  104. |---------------------------------------------------------------------------
  105. |
  106. | By adding `wire:navigate` to links in your Livewire application, Livewire
  107. | will prevent the default link handling and instead request those pages
  108. | via AJAX, creating an SPA-like effect. Configure this behavior here.
  109. |
  110. */
  111. 'navigate' => [
  112. 'show_progress_bar' => true,
  113. 'progress_bar_color' => '#2299dd',
  114. ],
  115. /*
  116. |---------------------------------------------------------------------------
  117. | HTML Morph Markers
  118. |---------------------------------------------------------------------------
  119. |
  120. | Livewire intelligently "morphs" existing HTML into the newly rendered HTML
  121. | after each update. To make this process more reliable, Livewire injects
  122. | "markers" into the rendered Blade surrounding @if, @class & @foreach.
  123. |
  124. */
  125. 'inject_morph_markers' => true,
  126. /*
  127. |---------------------------------------------------------------------------
  128. | Pagination Theme
  129. |---------------------------------------------------------------------------
  130. |
  131. | When enabling Livewire's pagination feature by using the `WithPagination`
  132. | trait, Livewire will use Tailwind templates to render pagination views
  133. | on the page. If you want Bootstrap CSS, you can specify: "bootstrap"
  134. |
  135. */
  136. 'pagination_theme' => 'tailwind',
  137. ];