Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not adding HTML package to Laravel using composer

Tags:

php

laravel-5

Laravel provides various in built tags to handle HTML forms easily and securely. All the major elements of HTML are generated using Laravel. So i am going to take this facility but its not working.

I use composer require laravelcollective/html.

Command prompt says:

laravel>composer require laravelcollective/html
Using version ^5.2 for laravelcollective/html
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update

Package illuminate/html is abandoned, you should avoid using it. Use laravelcollective/html instead.

Generating autoload files
> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Generating optimized class loader
like image 255
Murad Hasan Avatar asked Nov 17 '25 06:11

Murad Hasan


1 Answers

Look for a vendor/illuminate/html or vendor/laravelcollective/html folder, relative to the project root. Look for the illuminate/html or laravelcollective/html string inside the composer.json or composer.lock.

The first one is the dependencies you defined, the seconde file contains the already installed ones.

I guess you already have that package as composer said nothing to install or update.

If the composer.lock or the vendor folder contains any of the strings/folders, then you have already installed it and can use them in your code.

UPDATE

Register the service provider in config/app.php by adding the following value into the providers array:

Collective\Html\HtmlServiceProvider::class

Register facades by adding these two lines in the aliases array:

 'Form' => Collective\Html\FormFacade::class,
  'Html' => Collective\Html\HtmlFacade::class,
like image 115
Tacsiazuma Avatar answered Nov 19 '25 21:11

Tacsiazuma



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!