Skip to content

Commit

Permalink
fix generate from direct command line
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Nov 13, 2023
1 parent 40fcb53 commit 125952e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Console/TomatoGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ public function handle(): void
}

//Check if user need to use HMVC
$isModule = $this->argument('module') && $this->argument('module') != "0" ?: confirm('Do you went to use HMVC module?');
$isModule = ($this->argument('module') && $this->argument('module') != "0") ?: confirm('Do you went to use HMVC module?');
$moduleName = false;
if ($isModule){
if (class_exists(\Nwidart\Modules\Facades\Module::class)){
$modules = \Nwidart\Modules\Facades\Module::toCollection()->map(function ($item){
return $item->getName();
});
$moduleName = $this->argument('module') && $this->argument('module') != "0" ?: suggest(
$moduleName = ($this->argument('module') && $this->argument('module') != "0") ? $this->argument('module') : suggest(
label:'Please input your module name?',
placeholder:'Translations',
options: fn (string $value) => strlen($value) > 0
Expand Down

0 comments on commit 125952e

Please sign in to comment.