InterNACHI/modular

Command $signature is being replaced with `modular_name:command`

WebKenth opened this issue · 0 comments

When making a new command for a module with

php artisan make:command {name} --module="{module}"

the signature is being removed due to a string replace malfunction :(

See image for reference
image

expected outcome was:
image

$find = [
"signature = 'command:name'",
"signature = 'app:{$cli_name}'",
];
$stub = str_replace($find, "{$module->name}:{$cli_name}", $stub);

could maybe be something like ??

- $stub = str_replace($find, "{$module->name}:{$cli_name}", $stub);
+ $stub = str_replace($find, "signature = '{$module->name}:{$cli_name}'", $stub);