下载照明\ http时,Laravel 5出错

时间:2015-06-25 21:50:44

标签: laravel

我尝试安装illuminate \ 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'的内容 这是正常的吗? 何我可以安装照亮\ http?还有其他方法吗?喜欢手动? 感谢。

1 个答案:

答案 0 :(得分:0)

它被称为"照亮/ html"不是"照亮/ http"

  

Illuminate / http默认带有laravel

打开您的项目目录

运行

composer require illuminate/html

打包后打开

  

配置/ 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,
],