欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

laravelcollective 的安装

shiping1 的头像

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require laravelcollective/html.

1)

"require": {
    "laravelcollective/html": "5.2.*"
}

Next, update Composer from the Terminal:

2)

composer update


也该也可以执行 composer require laravelcollective/html (推荐使用这种方法,因为只安装它 不更新其它)

Next, add your new provider to the providers array of config/app.php:

  'providers' => [
    // ...
    Collective\Html\HtmlServiceProvider::class,
    // ...
  ],

Finally, add two class aliases to the aliases array of config/app.php:

  'aliases' => [
    // ...
      'Form' => Collective\Html\FormFacade::class,
      'Html' => Collective\Html\HtmlFacade::class,
    // ...
  ],

Looking to install this package in Lumen? First of all, making this package compatible with Lumen will require some core changes to Lumen, which we believe would dampen the effectiveness of having Lumen in the first place. Secondly, it is our belief that if you need this package in your application, then you should be using Laravel anyway.


来自 https://laravelcollective.com/docs/5.2/html
普通分类: