Laravel-modules: Generator doesn't follow config file

Created on 3 Nov 2019  路  7Comments  路  Source: nWidart/laravel-modules

Laravel: 6.2
Lararvel-module: 6.1

I try to remove some folder I don't need from module generator, and flagged their generate key on config file to false but nothing effected

after some trace, I found the problem with method generateFiles on ModuleGenerator line 360

you need to use continue keyword not $this->filesystem->makeDirectory($dir, 0775, true);

carbon

please fix it ASAP

7.0

Most helpful comment

I'm waiting for your PR too.

All 7 comments

Hi,

Thanks for reporting.

please fix it ASAP

This is opensource, feel free to submit a tested PR.

I was able to reproduce the issue, however, the fix is not as simple as you suggest.

Doing this is correct, but will require a breaking change of adding more keys in the generator configuration key, like for example:

'routes' => ['path' => 'Routes', 'generate' => true],
'views-layouts' => ['path' => 'Resources/views/layouts', 'generate' => true],

Which are implicit based on the files configured. Every file configured should have a generator folder configuration too, basically.

Then, the seeders are not generated in that location but in generateResources method. So there should be a condition for each resource generated (seeds, providers, etc.).

I'm not sure there's a good way of solved this without a breaking change.

I noticed this too when I was trying to fix the issue for the PR. I'll check it deeply at home and tell you what I think.

I think the other ones will have to wait until the next major release.

Any news? I'm waiting.

I'm waiting for your PR too.

Was this page helpful?
0 / 5 - 0 ratings