英文:
Laravel/horizon missing css/js build
问题
/horizon
路由来自 laravel/horizon 包能够正常工作,但是 CSS 和 JavaScript 没有被加载。
这是 /horizon
路由的样子:
然而,我只是安装了这个包并且按照 Laravel 文档的安装步骤进行了操作:
- composer require laravel/horizon
- php artisan horizon:install
- php artisan optimize
- npm run dev(我也尝试了 npm run build,...)
这是我的配置:
- laravel-mix 4.0.7
- laravel/horizon 5.14
- laravel 8.0
你能帮我吗?
英文:
The /horizon
route from the laravel/horizon package works, but the css and javascript are not loaded.
this is what the road /horizon looks like:
However, I just installed the package and followed the laravel documentation installation
- composer require laravel/horizon
- php artisan horizon:install
- php artisan optimize
- npm run dev ( and I tried npm run build,...)
this is my config :
- laravel-mix 4.0.7
- laravel/horizon 5.14
- laravel 8.0
Can you help me ?
答案1
得分: 1
确保资产已包含在您的应用程序中。尝试运行以下命令。
php artisan vendor:publish --tag=horizon-assets && npm run dev
英文:
Make sure assets are included in your application. Try running the following command.
php artisan vendor:publish --tag=horizon-assets && npm run dev
答案2
得分: 0
已解决的变量环境:
ASSET_URL=/.
英文:
Resolved with variable environment :
ASSET_URL=/.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论