You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

livewire.php 5.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Class Namespace
  6. |--------------------------------------------------------------------------
  7. |
  8. | This value sets the root namespace for Livewire component classes in
  9. | your application. This value affects component auto-discovery and
  10. | any Livewire file helper commands, like `artisan make:livewire`.
  11. |
  12. | After changing this item, run: `php artisan livewire:discover`.
  13. |
  14. */
  15. 'class_namespace' => 'App\\Http\\Livewire',
  16. /*
  17. |--------------------------------------------------------------------------
  18. | View Path
  19. |--------------------------------------------------------------------------
  20. |
  21. | This value sets the path for Livewire component views. This affects
  22. | file manipulation helper commands like `artisan make:livewire`.
  23. |
  24. */
  25. 'view_path' => resource_path('views/livewire'),
  26. /*
  27. |--------------------------------------------------------------------------
  28. | Layout
  29. |--------------------------------------------------------------------------
  30. | The default layout view that will be used when rendering a component via
  31. | Route::get('/some-endpoint', SomeComponent::class);. In this case the
  32. | the view returned by SomeComponent will be wrapped in "layouts.app"
  33. |
  34. */
  35. 'layout' => 'layouts.app',
  36. /*
  37. |--------------------------------------------------------------------------
  38. | Livewire Assets URL
  39. |--------------------------------------------------------------------------
  40. |
  41. | This value sets the path to Livewire JavaScript assets, for cases where
  42. | your app's domain root is not the correct path. By default, Livewire
  43. | will load its JavaScript assets from the app's "relative root".
  44. |
  45. | Examples: "/assets", "myurl.com/app".
  46. |
  47. */
  48. 'asset_url' => null,
  49. /*
  50. |--------------------------------------------------------------------------
  51. | Livewire App URL
  52. |--------------------------------------------------------------------------
  53. |
  54. | This value should be used if livewire assets are served from CDN.
  55. | Livewire will communicate with an app through this url.
  56. |
  57. | Examples: "https://my-app.com", "myurl.com/app".
  58. |
  59. */
  60. 'app_url' => null,
  61. /*
  62. |--------------------------------------------------------------------------
  63. | Livewire Endpoint Middleware Group
  64. |--------------------------------------------------------------------------
  65. |
  66. | This value sets the middleware group that will be applied to the main
  67. | Livewire "message" endpoint (the endpoint that gets hit everytime
  68. | a Livewire component updates). It is set to "web" by default.
  69. |
  70. */
  71. 'middleware_group' => 'web',
  72. /*
  73. |--------------------------------------------------------------------------
  74. | Livewire Temporary File Uploads Endpoint Configuration
  75. |--------------------------------------------------------------------------
  76. |
  77. | Livewire handles file uploads by storing uploads in a temporary directory
  78. | before the file is validated and stored permanently. All file uploads
  79. | are directed to a global endpoint for temporary storage. The config
  80. | items below are used for customizing the way the endpoint works.
  81. |
  82. */
  83. 'temporary_file_upload' => [
  84. 'disk' => null, // Example: 'local', 's3' Default: 'default'
  85. 'rules' => null, // Example: ['file', 'mimes:png,jpg'] Default: ['required', 'file', 'max:12288'] (12MB)
  86. 'directory' => null, // Example: 'tmp' Default 'livewire-tmp'
  87. 'middleware' => null, // Example: 'throttle:5,1' Default: 'throttle:60,1'
  88. 'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs.
  89. 'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
  90. 'mov', 'avi', 'wmv', 'mp3', 'm4a',
  91. 'jpg', 'jpeg', 'mpga', 'webp', 'wma',
  92. ],
  93. 'max_upload_time' => 5, // Max duration (in minutes) before an upload gets invalidated.
  94. ],
  95. /*
  96. |--------------------------------------------------------------------------
  97. | Manifest File Path
  98. |--------------------------------------------------------------------------
  99. |
  100. | This value sets the path to the Livewire manifest file.
  101. | The default should work for most cases (which is
  102. | "<app_root>/bootstrap/cache/livewire-components.php"), but for specific
  103. | cases like when hosting on Laravel Vapor, it could be set to a different value.
  104. |
  105. | Example: for Laravel Vapor, it would be "/tmp/storage/bootstrap/cache/livewire-components.php".
  106. |
  107. */
  108. 'manifest_path' => null,
  109. /*
  110. |--------------------------------------------------------------------------
  111. | Back Button Cache
  112. |--------------------------------------------------------------------------
  113. |
  114. | This value determines whether the back button cache will be used on pages
  115. | that contain Livewire. By disabling back button cache, it ensures that
  116. | the back button shows the correct state of components, instead of
  117. | potentially stale, cached data.
  118. |
  119. | Setting it to "false" (default) will disable back button cache.
  120. |
  121. */
  122. 'back_button_cache' => false,
  123. /*
  124. |--------------------------------------------------------------------------
  125. | Render On Redirect
  126. |--------------------------------------------------------------------------
  127. |
  128. | This value determines whether Livewire will render before it's redirected
  129. | or not. Setting it to "false" (default) will mean the render method is
  130. | skipped when redirecting. And "true" will mean the render method is
  131. | run before redirecting. Browsers bfcache can store a potentially
  132. | stale view if render is skipped on redirect.
  133. |
  134. */
  135. 'render_on_redirect' => false,
  136. ];