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