Open 4n70w4 opened 4 years ago
Hi! I already use nwidart/laravel-modules for generate modules and I want to put nova classes in the same modules.
nwidart/laravel-modules
Current structure:
But directories and namespaces is hardcoded in your package =(
For example:
Hardoded path for Resources https://github.com/mycmdev/nova-modules/blob/779a600fe5d9240523792347305275ca72adc3a7/src/Commands/MakeResourceCommand.php#L73
Hardcoded namespace for Resources https://github.com/mycmdev/nova-modules/blob/779a600fe5d9240523792347305275ca72adc3a7/src/Stubs/Resource.stub#L3
In nwidart/laravel-modules pathes and namespaces not hardcoded and generated dinamically:
$path = GenerateConfigReader::read('factory')->getPath(); $namespace = GenerateConfigReader::read('factory')->getNamespace();
This way is better and more convenient.
For example I add to nwidart/laravel-modules config file config/modules.php:102 paths / generator section for generate Nova directories:
config/modules.php:102
paths
generator
'actions' => ['path' => 'Nova/Actions', 'generate' => true], 'cards' => ['path' => 'Nova/Cards', 'generate' => true], 'dashboards' => ['path' => 'Nova/Dashboards', 'generate' => true], 'filters' => ['path' => 'Nova/Filters', 'generate' => true], 'lenses' => ['path' => 'Nova/Lenses', 'generate' => true], 'metrics' => ['path' => 'Nova/Metrics', 'generate' => true], 'resources' => ['path' => 'Nova/Resources', 'generate' => true],
Hello, i know, but the package is still under developing.. i will add this to my TODO. Thx for reporting this issue
Hi! I already use
nwidart/laravel-modules
for generate modules and I want to put nova classes in the same modules.Current structure:
But directories and namespaces is hardcoded in your package =(
For example:
Hardoded path for Resources https://github.com/mycmdev/nova-modules/blob/779a600fe5d9240523792347305275ca72adc3a7/src/Commands/MakeResourceCommand.php#L73
Hardcoded namespace for Resources https://github.com/mycmdev/nova-modules/blob/779a600fe5d9240523792347305275ca72adc3a7/src/Stubs/Resource.stub#L3
In
nwidart/laravel-modules
pathes and namespaces not hardcoded and generated dinamically:This way is better and more convenient.
For example I add to
nwidart/laravel-modules
config fileconfig/modules.php:102
paths
/generator
section for generate Nova directories: