Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel and HTML Form Builder

I like the Form Builder. Go Laravel.

What's the difference between the Illuminate version and the Laravel Collective version, and which should we use? Is the Illuminate version now defunct?

like image 589
JoshuaDavid Avatar asked Jan 09 '23 16:01

JoshuaDavid


2 Answers

You have an explanation here : http://laravel.com/docs/5.0/upgrade#upgrade-5.0 under Form & HTML Helpers

Basically, the Illuminate versions of the Form helper and HTML helper are deprecated in the current version of Laravel and have been removed from the framework's core. They are now maintained by the Laravel Collective.

So if you working with Laravel 5, you should use the Laravel Collective version, you can find it here: laravel Collective: Forms & HTML

like image 156
Needpoule Avatar answered Jan 31 '23 09:01

Needpoule


In Laravel 5 it is not standard anymore, but you can add it quickly in the composer file if you prefer to work with forms like you did in Laravel 4.

Just add this line in the composer.json, under the require section:

"illuminate/html": "5.*"

After this step you first need to run the composer update command and you should be good to add the rest.

Then you need to add the service providers in config/app.php under providers section like this:

Illuminate\Html\HtmlServiceProvider

And as the last part enter these two lines in the config/app.php under aliases section:

'Form'=> 'Illuminate\Html\FormFacade',
'HTML'=> 'Illuminate\Html\HtmlFacade'
like image 34
nclsvh Avatar answered Jan 31 '23 09:01

nclsvh