当我尝试打开资产时,我在页面上添加了源(css,js),我在页面末尾发现了日志错误。Laravel 5.2资产实施
这里是我试过到目前为止:
homepage.blade.php
<link href="{{{asset('/css/bootstrap.css') }}}" rel="stylesheet">
Composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"laravelcollective/html": "^5.2"
}
作曲家更新从控制台。
加入app.php->提供商
Collective\Html\HtmlServiceProvider::class
加入app.php->别名
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class
我laravel.log得到这样的:
local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Class 'Illuminate\Html\HtmlServiceProvider' not found' in /var/www/html/myproject/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php:146
提前致谢。
我不知道这是否会做到这一点,但我通常只使用两个'{{'。所以它会是'{{asset()}}'。但我不认为这是你的问题,请仔细检查文件是否确实存在于供应商文件夹中。 –
尝试集体\ HTML \ HtmlServiceProvider ::类 –
@DevinGray不会改变任何东西。 –