Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FatalErrorException in ProviderRepository.php line 208: Class 'Illuminate\Html\HtmlServiceProvider' not found

i have just install Html package on laravel by composer require laravelcollective/html and then i run my code but it is not success , then i add

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

and

 Illuminate\Html\HtmlServiceProvider::class,

to app.php

then I again run

 FatalErrorException in ProviderRepository.php line 208:
 Class 'Illuminate\Html\HtmlServiceProvider' not found
like image 713
prakash pokhrel Avatar asked May 16 '17 11:05

prakash pokhrel


3 Answers

Add this to your composer.json file:

"require": {
    "laravelcollective/html": "5.1.*"
}

Run composer update

Add the following to your providers array in config/app.php

'providers' => [
    Collective\Html\HtmlServiceProvider::class,
  ],

Add the aliases to the aliases array of config/app.php

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

Run composer dump-autoload -o

like image 120
Deathstorm Avatar answered Nov 18 '22 06:11

Deathstorm


I got the same problem error but in my case it was

In ProviderRepository.php line 208:

  Class 'Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider' not found


Script php artisan optimize handling the post-update-cmd event returned with error code 1

Though I tried and followed your(@Deathstorm) method but it did not work in my case so tried reinstalling the package as a whole and followed instruction from here now it works

like image 25
Pratik Khadka Avatar answered Nov 18 '22 07:11

Pratik Khadka


Issue is resolved by just follow these step.

Go to your project > bootstrap->cache->config.php remove the provider and aliases from the cached array manually.

like image 32
Mohsin Younas Avatar answered Nov 18 '22 06:11

Mohsin Younas