I'm using the laravel 5.1 framework on my centos6 host. I already used composer install illuminate/html
, but calling HTML::style()
results in this error: FatalErrorException in 7b06fa36a7460c71e5daf57645a3dbda line 12: Call to undefined method Illuminate\Html\HtmlServiceProvider::style()
My app config :
'aliases' => [
//more...
'HTML' => Illuminate\Html\HtmlServiceProvider::class,
'Form' => Illuminate\Html\FormFacade::class
],
'providers' => [
//more...
Illuminate\View\ViewServiceProvider::class,
Illuminate\Html\HtmlServiceProvider::class,
]
composer.json:
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"illuminate/html": "5.*"
},
Such as {!! Form::open() !!} ...
is well except HTML::style()
.
What should I do?
You have aliased invalid class.
Replace
'HTML' => Illuminate\Html\HtmlServiceProvider::class,
with
'HTML' => Illuminate\Html\HtmlFacade::class,
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With