lasthourcloud/config/livewire.php

148 lines
5.6 KiB
PHP
Raw Normal View History

2023-08-07 13:31:42 +00:00
<?php
return [
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
| Class Namespace
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| This value sets the root class namespace for Livewire component classes in
| your application. This value will change where component auto-discovery
| finds components. It's also referenced by the file creation commands.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'class_namespace' => 'App\\Livewire',
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
| View Path
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| This value is used to specify where Livewire component Blade templates are
| stored when running file creation commands like `artisan make:livewire`.
| It is also used if you choose to omit a component's render() method.
2023-08-07 13:31:42 +00:00
|
*/
'view_path' => resource_path('views/livewire'),
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
| Layout
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| The view that will be used as the layout when rendering a single component
| as an entire page via `Route::get('/post/create', CreatePost::class);`.
| In this case, the view returned by CreatePost will render into $slot.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'layout' => 'components.layout',
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Temporary File Uploads
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| Livewire handles file uploads by storing uploads in a temporary directory
| before the file is stored permanently. All file uploads are directed to
| a global endpoint for temporary storage. You may configure this below:
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Render On Redirect
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| This value determines if Livewire will run a component's `render()` method
| after a redirect has been triggered using something like `redirect(...)`
| Setting this to true will render the view once more before redirecting
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'render_on_redirect' => false,
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Eloquent Model Binding
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| Previous versions of Livewire supported binding directly to eloquent model
| properties using wire:model by default. However, this behavior has been
| deemed too "magical" and has therefore been put under a feature flag.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'legacy_model_binding' => true,
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Auto-inject Frontend Assets
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| By default, Livewire automatically injects its JavaScript and CSS into the
| <head> and <body> of pages containing Livewire components. By disabling
| this behavior, you need to use @livewireStyles and @livewireScripts.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'inject_assets' => true,
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Navigate (SPA mode)
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| By adding `` to links in your Livewire application, Livewire
| will prevent the default link handling and instead request those pages
| via AJAX, creating an SPA-like effect. Configure this behavior here.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'navigate' => [
'show_progress_bar' => true,
2023-12-07 22:31:03 +00:00
'progress_bar_color' => '#ffff00',
2023-12-07 18:06:32 +00:00
],
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| HTML Morph Markers
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| Livewire intelligently "morphs" existing HTML into the newly rendered HTML
| after each update. To make this process more reliable, Livewire injects
| "markers" into the rendered Blade surrounding @if, @class & @foreach.
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'inject_morph_markers' => true,
2023-08-07 13:31:42 +00:00
/*
2023-12-07 18:06:32 +00:00
|---------------------------------------------------------------------------
| Pagination Theme
|---------------------------------------------------------------------------
2023-08-07 13:31:42 +00:00
|
2023-12-07 18:06:32 +00:00
| When enabling Livewire's pagination feature by using the `WithPagination`
| trait, Livewire will use Tailwind templates to render pagination views
| on the page. If you want Bootstrap CSS, you can specify: "bootstrap"
2023-08-07 13:31:42 +00:00
|
*/
2023-12-07 18:06:32 +00:00
'pagination_theme' => 'tailwind',
2023-08-07 13:31:42 +00:00
];