[英]Facing 404, The route could not be found. Laravel Livewire
我面臨 404,找不到路由public/livewire/message/software-category
。
我將 Laravel 9 與 livewire 一起使用,並且我的組件已完美加載,但是當我嘗試更新組件的任何屬性值時,它返回404 not found
。
這是我的.env
APP_URL=https://fyp.devndesigns.com/
ASSET_URL=https://fyp.devndesigns.com/public
這是我的 config/livewire.php,我在其中更改了 asset_url 但它不起作用。
<?php
return [
/*
|--------------------------------------------------------------------------
| Livewire Assets URL
|--------------------------------------------------------------------------
|
| This value sets the path to Livewire JavaScript assets, for cases where
| your app's domain root is not the correct path. By default, Livewire
| will load its JavaScript assets from the app's "relative root".
|
| Examples: "/assets", "myurl.com/app".
|
*/
'asset_url' => env('ASSET_URL'),
/*
|--------------------------------------------------------------------------
| Livewire App URL
|--------------------------------------------------------------------------
|
| This value should be used if livewire assets are served from CDN.
| Livewire will communicate with an app through this url.
|
| Examples: "https://my-app.com", "myurl.com/app".
|
*/
'app_url' => null,
.env
更改為:
APP_URL=https://fyp.devndesigns.com
ASSET_URL=https://fyp.devndesigns.com
和config/livewire.php
'asset_url' => env('ASSET_URL', null),
'app_url' => env('APP_URL', 'http://localhost'),
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.