migrations-generator
migrations-generator copied to clipboard
Call to undefined method Laravel\Lumen\Application::configPath()
Lumen
"laravel/lumen-framework": "5.5.*",
the same
too. After istalling Xethron/migrations-generator and registering service provider
#MeToo
Lumen: 5.7.*
Nice, 20 days and no solution :(
Guess we have to add them manually!
hey @angelovancleef did you found a solution ? Can you share it ? :)
I did a stack trace and made some monkey-patches to get it working for me (lumen 5.5)
Here's the gist https://gist.github.com/aaronkaz/44586f270410d011dc3d93f960c046e7
my solution for this is simple :
- Create a new laravel service provider in your application like this:
namespace App\Providers;
use Laravel\Lumen\Providers\EventServiceProvider as ServiceProvider;
use Way\Generators\GeneratorsServiceProvider; // IMPORTANT !!
class GeneratorsFixer **extends GeneratorsServiceProvider** // IMPORTANT !!
{
/**
* Register the config paths
*/
public function registerConfig()
{
$userConfigFile = config_path().'/generators.config.php'; // IMPORTANT !!
$packageConfigFile = base_path().'/vendor/xethron/laravel-4-generators/src/config/config.php'; // IMPORTANT !!
$config = $this->app['files']->getRequire($packageConfigFile);
if (file_exists($userConfigFile)) {
$userConfig = $this->app['files']->getRequire($userConfigFile);
$config = array_replace_recursive($config, $userConfig);
}
$this->app['config']->set('generators.config', $config);
}
}
- register and replace the Way\Generators\GeneratorsServiceProvider by your custom service provider (in our case it's \App\Providers\GeneratorsFixer::class) in your AppServiceprovider.
that's all :)