Thứ Năm, 2 tháng 8, 2018

Cách cài Laravel Collective HTML cho Laravel 5.6

Installation

Begin by installing this package through Composer. Edit your project's composer.json file to require laravelcollective/html.
"require": {
    "laravelcollective/html": "~5.0"
}
Next, update Composer from the Terminal:
composer update
Next, add your new provider to the providers array of config/app.php:
  'providers' => [
    // ...
    'Collective\Html\HtmlServiceProvider',
    // ...
  ],
Finally, add two class aliases to the aliases array of config/app.php:
  'aliases' => [
    // ...
      'Form' => 'Collective\Html\FormFacade',
      'Html' => 'Collective\Html\HtmlFacade',
    // ...
  ],

Next, update Composer from the Terminal:
composer update
When you update your composer it will check the providers. Because you haven't installed laravelcollective/html yet he can't find it and throws an error:
So first require your packeges, then add them to the config file.
You can also work with composer require laravelcollective/html, it will add it to the json file automatically. Then it doesn't matter if you have added them before or not because the config file won't be checked.

Không có nhận xét nào:

Đăng nhận xét

Laravel với MongoDB

Mở đầu Hello anh em, đến hẹn lại lên hôm nay mình xin chia sẻ với mọi người về chủ đề Laravel kết hợp với MongoDB mà thông thường ta hay ...