Md. Harun Or Rashid
Md. Harun Or Rashid

Reputation: 2180

How can I know the namespace of a 'serviceprovider' class in Laravel 5.2?

I use Laravel 5.2. I found the error message...

Fatal error: Class 'HTML' not found (View: D:\Websites\htdocs\eloquent\resources\views\nerds\create.blade.php)

To solve this problem, I use the following command...

composer require illuminate/html

and update Composer

The Path of the 'Service Provider' I downloaded is ...

vendor > illuminate > html > HtmlServiceProvider.php

In the app.php file the following line is not solving the problem.

Illuminate\html\HtmlServiceProvider::class;

What should I write instead?

Would anybody please help?

Upvotes: 0

Views: 60

Answers (1)

smartrahat
smartrahat

Reputation: 5609

Add these two lines inside aliases in app.php. The code should look like this

'aliases' => [
    // other aliases
    'Form' => Illuminate\Html\FormFacade::class,
    'HTML' => Illuminate\Html\HtmlFacade::class,
]

Upvotes: 0

Related Questions