php artisan ide-helper:generate -S
returns the following error:
"error":{"type":"SymfonyComponentDebugExceptionFatalErrorException","message":"Class 'BarryvdhLaravelIdeHelperIdeHelperServiceProvider' not found","file":"/www/site/bootstrap/compiled.php","line":7075}}
Do you have the latest version (try running composer update)? Is barryvdh/laravel-ide-helper in you vendor dir?
That fixed the error. Thanks! Now I'm getting a new error:
[InvalidArgumentException] There are no commands defined in the "ide-helper" namespace.
Hm, that is weird. Do you have the ServiceProvider in app.php?
'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider',
Does the command show up when you do just php artisan?
Thank you for your help!
Had the same problem as @fuzaylov but adding the line 'Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider', in app.php 'providers' array fixed it.
I have 'BarryvdhLaravelIdeHelperIdeHelperServiceProvider' string in my config/local/app.php file;
and php artisan ide-helper:generate gave the same error. What should i do on dev environment? (if i add this provider to app.php (not /local/app.php) all works fine)
Are you using the appends function in your local file?
php artisan config:clear
Apparently Laravel 5 doesn't use the environment folders in config anymore:
https://laracasts.com/discuss/channels/general-discussion/l5-append-config-problem
First after installing laravel ide helper, Update dependencies and then add this to your providers. it works like charm.
BarryvdhLaravelIdeHelperIdeHelperServiceProvider::class,
And after this run this and anymore...
php artisan ide-helper:generate
For me it only worked after I did php artisan config:cache and php artisan cache:clear, otherwise it still wasn't recognized.
to MoPHL : Thanks to me it also helped
Resolved in my Laravel 4 doing this:
Register the command in appstartartisan.php
Artisan::add(new CustomCommand);
Clearing the artisan cache
php artisan cache:clear
This happened to me today, I'm on L5.2, After some commits at home, I came to work and this happened, it has to be something with the git ignores, and preconfigured/precomnpiled stuff, the php artisan config:clear solved it.
Encountered the same problem.
I had separated configs for each environment. My environment wasnt detected properly after a reinstall which caused this error.
Most helpful comment
php artisan config:clear