Alisa
Alisa

Reputation: 553

Laravel 5.2 ErrorException in FormBuilder.php

Laravel 5.2 ErrorException in FormBuilder.php line 1235 Method style does not exist.

I am not sure about this error. I have already updated my composer.json file with "laravelcollective/html": "^5.2" under "require" section and config/app.php file with

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\FormFacade::class,

under aliases section and below code under providers section

Collective\Html\HtmlServiceProvider::class,

my layout file contains the following code: {!! Html::style('css/bootstrap.min.css') !!} As soon as I put this line, the system through the error. The same code is working fine in my other laravel project

Upvotes: 0

Views: 431

Answers (1)

Mateusz Sip
Mateusz Sip

Reputation: 1280

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\FormFacade::class,

You registered FormFacade as Html.

Try with:

'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,

should work ;)

Upvotes: 2

Related Questions