style updates

This commit is contained in:
Mark Gregory
2026-07-24 14:59:44 +01:00
parent 24ab771cd3
commit dd23205d0b
482 changed files with 7173 additions and 1435 deletions
@@ -9,15 +9,24 @@ use Throwable;
final class MakeCrudCommand extends Command
{
protected $signature = 'crud:make {model} {--module=} {--force}';
protected $description = 'Generate model, migration, request, controller, views and test inside a module.';
public function handle(CrudGenerator $generator): int
{
$module = $this->option('module') ?: $this->choice('Select the target module', $this->modules());
try { $files = $generator->generate((string) $module, $this->argument('model'), (bool) $this->option('force')); }
catch (Throwable $e) { $this->error($e->getMessage()); return self::FAILURE; }
foreach ($files as $file) { $this->line("<info>created</info> {$file}"); }
try {
$files = $generator->generate((string) $module, $this->argument('model'), (bool) $this->option('force'));
} catch (Throwable $e) {
$this->error($e->getMessage());
return self::FAILURE;
}
foreach ($files as $file) {
$this->line("<info>created</info> {$file}");
}
$this->warn('Register the generated controller routes in the target module Routes/web.php file.');
return self::SUCCESS;
}