我正在使用laravel 5.5,我想在不使用composer的情况下安装laravelcollective。我已按照其他问题中提到的步骤将其安装在laravel 5.2中,但它产生以下错误。 Class Collective\Html\HtmlServiceProvider not found
请提出错误的可能原因。
Shashank Simha M R,我认为最好的方法是通过像这样的作曲家安装它:composer require laravelcollective/html "5.5.*"
。在这里,您只需指定已安装的Laravel的版本。否则,composer将无法安装它。
之后,您只需更新config / app.php文件:
$provider
数组:Collective\Html\HtmlServiceProvider::class
'Form' => Collective\Html\FormFacade::class
,'Html' => Collective\Html\HtmlFacade::class
,
That is it!
转到此链接:
https://github.com/LaravelCollective/html
下载该包并将其解压缩到/ vendor /文件夹,以便您拥有此路径
/vendor/laravelcollective/html/src/HtmlServiceProvider.php
接下来,将您的新提供程序添加到config / app.php的providers数组中:
'providers' => [
// ...
Collective\Html\HtmlServiceProvider::class,
// ...
],
最后,将两个类别名添加到config / app.php的别名数组中:
'aliases' => [
// ...
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
// ...
],
它应该工作。