我的 css 文件不在我的 .blade.php 文件中 运行

My css files are not running inside my .blade.php file

我正在用 Laravel 8.0 为我做一个小网站。

home.blade.php 里面,我有这个:<link rel="stylesheet" href="{{ asset('css/header.css') }}"> 但是当我转到我的浏览器时,我的页面中没有 css 。在开发人员工具中,它显示 <link rel="stylesheet" href="http://localhost/css/header_site.css">.

我所有的 css 都在 public/assets/css 文件夹中。

我还在 httpd-vhosts.conf 里面使用了 VirtualHost,我在 DocumentRoot "C:/xampp/htdocs/my-project/public".

亲切

尝试在 .env 文件中配置资产 url。 ASSET_URL=http://localhost/assets/。然后做 {{asset('css/header.css')}}