當我嘗試打開資產時,我在頁面上添加了源(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不會改變任何東西。 –