Inclusion in 'providers' array breaks artisan
Deacs opened this issue · 3 comments
After adding 'Nwidart\DbExporter\DbExportHandlerServiceProvider' to the 'providers' array in config/app.php, any call to php artisan [any existing command] returns ' [BadMethodCallException] Call to undefined method [package]'
If the reference to the ServiceProvider is removed, artisan functions as expected.
Installation guide has been followed to the letter although I am running Laravel 5.1. Had to use dev-master as 1.0 would not install.
If I comment out $this->package('nwidart/db-exporter'); from the boot() method in #27 of DbExportHandlerServiceProvider.php, artisan is functional but •php artisan dbe:seeds• throws PHP Fatal error: Class 'Str' not found in /base/myapp/vendor/nwidart/db-exporter/src/Nwidart/DbExporter/DbSeeding.php on line 112
Obviously happy to provide any further details that would help.
I had the same problem. Just started learning Laravel a few weeks ago. Seems like they changed something in Laravel 5 quite newly.
I managed to solve the problem by commenting out the mentioned row in the previous comment and by
adding this row to my aliases array in config/app.php
Str' => 'Illuminate\Support\Str',
See #30 for a workaround.
Apologies, just seen the workaround reply. Thanks for responding