Support the ongoing development of Laravel.io →
Views Blade Forms

I have added this to my composer.json

"laravelcollective/html": "5.1.*"

Then ran composer update

Added this to my app.php providers:

Collective\Html\HtmlServiceProvider::class,

And this to aliases:

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

When I do this in my blade form:

{{ HTML::image('img/administrator.png') }}

I get this error:

Class 'HTML' not found

if I do this according to the class name case:

{{ Html::image('img/administrator.png') }}

It shows this on the form

<img src="http://evip.dev/img/administrator.png">

Any suggestions?

Thanks

Last updated 3 years ago.
0

Type

use Html;

Above your controller class

Last updated 9 years ago.
0

Added to controller that calls the view, but it is the same :(

0

Add a slash before the class like, \Html

0

Sign in to participate in this thread!

PHPverse

Your banner here too?

AtomicRSA atomicrsa Joined 24 Jun 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.