2015-06-25 64 views
0

我試圖安裝照射\ http和我得到這個錯誤:比這個Laravel 5錯誤下載照亮時 HTTP

[Symfony\Component\Debug\Exception\FatalErrorException] 
    Class 'Illuminate\Html\HtmServiceProvider' not found 

Script php artisan clear-compiled handling the post-update-cmd event returned with an error 

    [RuntimeException] 
    Error Output: 

require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-update] 
[--update-no-dev] [--update-with-dependencies] [--ignore-platform-reqs] [--sort- 
packages] [packages1] ... [packagesN] 

更多,在商區,我看到我的這些app.php文件:

Illuminate\Foundation\Providers\ArtisanServiceProvider::class, 
     Illuminate\Auth\AuthServiceProvider::class, 
     Illuminate\Broadcasting\BroadcastServiceProvider::class, 
     Illuminate\Bus\BusServiceProvider::class, 
     Illuminate\Cache\CacheServiceProvider::class, 
     Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 
     Illuminate\Routing\ControllerServiceProvider::class, 
     Illuminate\Cookie\CookieServiceProvider::class, 
     Illuminate\Database\DatabaseServiceProvider::class, 
     Illuminate\Encryption\EncryptionServiceProvider::class, 
     Illuminate\Filesystem\FilesystemServiceProvider::class, 
     Illuminate\Foundation\Providers\FoundationServiceProvider::class, 
     Illuminate\Hashing\HashServiceProvider::class, 
     Illuminate\Mail\MailServiceProvider::class, 
     Illuminate\Pagination\PaginationServiceProvider::class, 
     Illuminate\Pipeline\PipelineServiceProvider::class, 
     Illuminate\Queue\QueueServiceProvider::class, 
     Illuminate\Redis\RedisServiceProvider::class, 
     Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 
     Illuminate\Session\SessionServiceProvider::class, 
     Illuminate\Translation\TranslationServiceProvider::class, 
     Illuminate\Validation\ValidationServiceProvider::class, 
     Illuminate\View\ViewServiceProvider::class, 

我希望看到像'Illuminate \ View \ ViewServiceProvider' 這是正常的嗎? 何我可以安裝illuminate \ http?有沒有其他方法?像手動? 謝謝。

回答

0

這就是所謂的 「亮/ HTML」 不 「亮/ HTTP」

Illuminate/http comes by default with laravel

打開您的項目目錄

運行

composer require illuminate/html 

包下載開放

config/app.php

在供應商加入這個

Illuminate\Html\HtmlServiceProvider::class, 

,並在別名添加這些

'Form' => Illuminate\Html\FormFacade::class, 
'HTML' => Illuminate\Html\HtmlFacade::class, 

所以,你的代碼看起來像這樣

'providers' => [ 
    Illuminate\Html\HtmlServiceProvider::class, 
], 

'aliases' => [ 
    'Form' => Illuminate\Html\FormFacade::class, 
    'HTML' => Illuminate\Html\HtmlFacade:class, 
], 
+0

感謝man.Now我得到類「形式」未找到 – Texas

+0

你有沒有添加FormFacade? – xdevnull

+0

是的,補充。作曲家更新...同樣的錯誤 – Texas