Laravel 5: Installing Form and HTML classes without composer Laravel 5: Installing Form and HTML classes without composer laravel laravel

Laravel 5: Installing Form and HTML classes without composer


Installing laracollective/html:

1) Download zip package from extension's git repository

2) Unpack contents and create this directory structure: laravelcollective/html/{contents of html-5.1 directory}

3) Copy this structure to the vendor folder in your Laravel installation.

4) In vendor/composer/autoload_classmap.php add these lines

'Collective\\Html\\FormBuilder' => $vendorDir . '/laravelcollective/html/src/FormBuilder.php','Collective\\Html\\FormFacade' => $vendorDir . '/laravelcollective/html/src/FormFacade.php','Collective\\Html\\HtmlBuilder' => $vendorDir . '/laravelcollective/html/src/HtmlBuilder.php','Collective\\Html\\HtmlFacade' => $vendorDir . '/laravelcollective/html/src/HtmlFacade.php','Collective\\Html\\HtmlServiceProvider' => $vendorDir . '/laravelcollective/html/src/HtmlServiceProvider.php',

after

    'ClassPreloader\\Parser\\NodeTraverser' => $vendorDir . '/classpreloader/classpreloader/src/Parser/NodeTraverser.php',

so that Laravel knows where to look for these classes when requested.

5) Add this line as a last element to return array(...) in vendor/composer/autoload_files.php

$vendorDir . '/laravelcollective/html/src/helpers.php',

6) Add this line to return array(...) in vendor/composer/autoload_psr4.php

// 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'),'Collective\\Html\\' => array($vendorDir . '/laravelcollective/html/src'),   // 'ClassPreloader\\' => array($vendorDir . '/classpreloader/classpreloader/src'),

7) Add providers to providers array of config/app.php:

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

],

8) Add two class aliases to the aliases array of config/app.php:

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

],

References:

http://laravelcollective.com/docs/5.1/html