I understand that there are several similar questions here but none of them fixed my problem.
I'm trying to add the HtmlServiceProvider with Laravel 5 on Ubuntu 14.04. I keep getting the following error:
dl@dl-VirtualBox:~/l5todo$ composer update
> php artisan clear-compiled
PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found in /home/dl/l5todo/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 146
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'Illuminate\Html\HtmlServiceProvider' not found
Script php artisan clear-compiled handling the pre-update-cmd event returned with an error
[RuntimeException]
Error Output: PHP Fatal error: Class 'Illuminate\Html\HtmlServiceProvider' not found i
n /home/dl/l5todo/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository
.php on line 146
My vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository
.php looks like:
/**
* Create a new provider instance.
*
* @param string $provider
* @return \Illuminate\Support\ServiceProvider
*/
public function createProvider($provider)
{
return new $provider($this->app);//line 146
}
My /.../config/app.php looks like:
'providers' => [
Illuminate\Html\HtmlServiceProvider::class, //newly added
......
],
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
......
'Form' => Illuminate\Html\FormFacade::class,
'Html' => Illuminate\Html\HtmlFacade::class,
],
In my compose.Jason
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"Illuminate/Html": "~5.0"
},
Any help would be really appreciated. Sorry again if this question seems duplicated to you.
composer update
works if I remove provider and aliases I added. But after I add them back in, same error appears.
composer install
(orcomposer update
)? 2) did you docomposer dump-autoload
afterwards? – Joel Hinzcomposer dump-autoload
works fine butcomposer install
andcomposer update
I got the class not found exception. – Daolin"illuminate/html"
make a difference? – Chris Burton