0

I'm using Laravel 5.6 for my project. The problem is I got an error message "Class 'HTML' not found" when I include this tag in my form.

{{ HTML::ul($errors->all()) }}

I already included the "laravelcollective/html": "^5.4.0" in my composer, config/app.php and my controller.

halfer
  • 19,824
  • 17
  • 99
  • 186
Nurdin
  • 23,382
  • 43
  • 130
  • 308
  • 1
    Check this [Laravel 5 Class 'HTML' not found Ask](https://stackoverflow.com/questions/28847726/laravel-5-class-html-not-found) – Exterminator Sep 11 '18 at 12:24
  • And [this link](https://laravelcollective.com/docs/5.4/html) – Rouhollah Mazarei Sep 11 '18 at 12:25
  • Hi Mohammad. As per the guidelines in _Meta_, please refrain from adding thanks or "please advice" (which is, in any case, misspelled). Readers know you need help, and any please-help-me material may be regarded as a form of begging. I've [asked this before](https://stackoverflow.com/q/52202600). – halfer Sep 18 '18 at 09:08

1 Answers1

5

Define Alias in app.php

 'aliases' => [
// ...
  'Form' => Collective\Html\FormFacade::class,
  'Html' => Collective\Html\HtmlFacade::class,
// ...],

And use Html not HTML

user1900956
  • 487
  • 2
  • 9