0
votes

I am new in Laravel. As I am learning it for the very first time, I am facing a lot more problems in every tutorial.

Recently I am facing
(1/1) FatalErrorException
Class 'Collective\Html\HtmlServiceProvider' not found in ProviderRepository.php line 208

problem. I am Searching a lot, Reading A lot but could not find a way to solve. As for My Project got Stuck in that state.

That's my ProviderRopository.php line 208.

public function createProvider($provider)
{
    return new $provider($this->app);

}

Hope you will help me.

1
I think you forgot to update your composer file composer require laravelcollective/html !! - Maraboc
I did composer require "laravelcollective/html":"^5.4.0" I don't know is it do update or not. Hope you would help me - Osman Gani Khan Masum

1 Answers

0
votes

Alhumdulillah

It worked.

First I have tried all of those three commands one after another.

php artisan config:clear
php artisan cache:clear
composer dump-autoload

then to check:

in every time when the problem was on, if i command

$ php artisan --version

it usually shows that error to me,

'Collective\Html\HtmlServiceProvider' not found in C:\xa mpp\htdocs\lsapp\vendor\laravel\framework\src\Illuminate\Foundation\ProviderRepo sitory.php on line 208

In ProviderRepository.php line 208:

Class 'Collective\Html\HtmlServiceProvider' not found

that means, I would not able to see my laravel version.

But after doing those aforesaid commands, I restarted codes by commenting, saving and deleting comment, I am now able to watch my laravel version.

$ php artisan --version

Laravel Framework 5.4.36

So, now I am thinking, My problem has solved.