codovel

We no longer support this blog. Please visit this site instead. https://laravelprojectlab.com

Saturday, June 18, 2016

Laravel Html, Form class not found in Laravel 5

Starting from Laravel 5, Html and Form class were removed by default.



To use it, you can use this package laravelcollective/html (https://laravelcollective.com).

* Suppose that your Laravel project is at C:\wamp\www\test_laravel.

Step 1: edit C:\wamp\www\test_laravel\composer.json file and insert this line

"laravelcollective/html": "5.2.*"

 

Step 2: Open command prompt (CMD) and go to root folder (C:\wamp\www\test_laravel) and type composer update

 

 Note: It take some minute to update it. Please be patient.

Step 3 : Edit file C:\wamp\www\test_laravel\config\app.php and add
Collective\Html\HtmlServiceProvider::class in providers array. 
'providers' => [
        .......
        .......
        Collective\Html\HtmlServiceProvider::class,
    ],
And add 'Form' => Collective\Html\FormFacade::class,'Html' => Collective\Html\HtmlFacade::class,
in aliases array.
    'aliases' => [
        ..............
        ..............
        'Form' => Collective\Html\FormFacade::class,
        'Html' => Collective\Html\HtmlFacade::class,
    ],

That's all. I hope it is working now.

1 comment:

Anonymous said...

Tidak sabar mengenai langkah supaya bisa lakukan withdraw beberapa ratus juta rupiah ?? jadi di bawah ini admin akan selekasnya memberi anda caraa agarr anda dapat memenangi beberapa ratus juta rupiah menurut pengalaman admin menjadi CS
asikqq
dewaqq
sumoqq
interqq
pionpoker
bandar ceme terpercaya
hobiqq
paito warna
forum prediksi