Laravel 9-获取http:// localhost:8000/css/app.css net :: err_aborted 404(找不到)
我无法在应用程序中使用app.css 我用 < link href =“ {{Asset('css/app.css')}}}}” rel =“ stylesheet” type =“ text/css”>
I can't use the app.css in my application
I use<link href="{{asset('css/app.css')}}" rel="stylesheet" type="text/css">
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
默认情况下,Asset()助手从
/public
文件夹开始。如果您已经考虑了这一点,那么唯一的问题是您尚未运行npm Run Dev
。&lt; link href =“ {{Asset('css/app.css')}}}}“ rel =“ stylesheet” type =“ text/css”&gt;
=public/css/css/css/css/css/css/css/css/css/ app.css
By default the asset() helper starts with the
/public
folder. If you have already taken this into consideration then the only problem will be that you have not runnpm run dev
.<link href="{{asset('css/app.css')}}" rel="stylesheet" type="text/css">
=public/css/app.css
在.env文件中检查您的资产URL。如果缺少它,将其添加到您的.env文件
Asset_url = public
中并运行PHP Artisan Config:Cache。
Check your asset url in .env file. If it is missing add it in your .env file
ASSET_URL=public
and run php artisan config:cache.
如果
并且
不工作,您可以使用
或可以使用
if
and
not work you can use
or you can use