Closed TiaossuP closed 8 years ago
ok, I get it. change
if ($this->app->environment() == 'local') {
$this->app->register('Wn\Generators\CommandsServiceProvider');
}
to
$this->app->register('Wn\Generators\CommandsServiceProvider');
and it seems useful.
Hello,
Based on the error message
PHP Fatal error: Class 'Wn\Generator\CommandsServiceProvider' not found in *\vendor\laravel\lumen-framework\src\Application.php on line 162
It seems that you wrote the wrong namespace for the class.
You wrote: Wn\Generator\CommandsServiceProvider
The correct one is: Wn\Generators\CommandsServiceProvider
(The s
in Generators
was missing)
This said, the if ($this->app->environment() == 'local')
has nothing to do with the error
first I run
composer require wn/lumen-generators
then I edit my AppServiceProvider,php like this:
I have already uncommentted 3 lines in the bootstrap/app.php file
but when I run
php artisan list
, I get this:PHP Fatal error: Class 'Wn\Generator\CommandsServiceProvider' not found in *\vendor\laravel\lumen-framework\src\Application.php on line 162
if I config a wrong composer.json? my composer.json: