Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我最近安装了 Laravel 5.2,在从项目公共文件夹加载 css 和 js 文件时遇到了一些问题。我对资源文件夹和公用文件夹上的资产文件有我的所有看法,我尝试安装 html 集合但不工作。有人可以帮我链接css和js文件,以便它们加载。
这是我的看法:
<link href="assets/css/style.css" rel="stylesheet"> <link rel="stylesheet" href="/css/app.css" />
您可以使用资产助手:
$url = asset('img/photo.jpg');
参考文档:https ://laravel.com/docs/5.2/helpers#method-asset