55namespace Bow \Console ;
66
77use ErrorException ;
8- use Bow \Support \Str ;
98use Bow \Console \Command \ReplCommand ;
109use Bow \Console \Command \ClearCommand ;
11- use Bow \Console \Command \ModelCommand ;
1210use Bow \Console \Command \SeederCommand ;
1311use Bow \Console \Command \ServerCommand ;
1412use Bow \Console \Command \WorkerCommand ;
15- use Bow \Console \Command \ConsoleCommand ;
16- use Bow \Console \Command \ServiceCommand ;
1713use Bow \Console \Command \AppEventCommand ;
18- use Bow \Console \Command \ProducerCommand ;
19- use Bow \Console \Command \ExceptionCommand ;
20- use Bow \Console \Command \MessagingCommand ;
2114use Bow \Console \Command \MigrationCommand ;
22- use Bow \Console \Command \ControllerCommand ;
23- use Bow \Console \Command \MiddlewareCommand ;
2415use Bow \Console \Command \ValidationCommand ;
2516use Bow \Console \Command \GenerateKeyCommand ;
26- use Bow \Console \Command \ConfigurationCommand ;
27- use Bow \Console \Command \EventListenerCommand ;
2817use Bow \Console \Command \GenerateCacheCommand ;
18+ use Bow \Console \Command \GenerateModelCommand ;
2919use Bow \Console \Command \GenerateQueueCommand ;
20+ use Bow \Console \Command \GenerateSeederCommand ;
21+ use Bow \Console \Command \GenerateConsoleCommand ;
22+ use Bow \Console \Command \GenerateServiceCommand ;
3023use Bow \Console \Command \GenerateSessionCommand ;
24+ use Bow \Console \Command \GenerateProducerCommand ;
25+ use Bow \Console \Command \GenerateExceptionCommand ;
26+ use Bow \Console \Command \GenerateMessagingCommand ;
27+ use Bow \Console \Command \GenerateControllerCommand ;
28+ use Bow \Console \Command \GenerateMiddlewareCommand ;
3129use Bow \Console \Command \GenerateNotificationCommand ;
30+ use Bow \Console \Command \GenerateConfigurationCommand ;
31+ use Bow \Console \Command \GenerateEventListenerCommand ;
3232use Bow \Console \Command \GenerateResourceControllerCommand ;
3333
3434class Command extends AbstractCommand
@@ -39,25 +39,28 @@ class Command extends AbstractCommand
3939 * @var array
4040 */
4141 private array $ commands = [
42- "clear " => ClearCommand::class,
43- "migration " => MigrationCommand::class,
44- "migrate " => MigrationCommand::class,
4542 "seed " => SeederCommand::class,
43+ "seed:table " => GenerateSeederCommand::class,
4644 "serve " => ServerCommand::class,
47- "add:controller " => ControllerCommand::class,
48- "add:configuration " => ConfigurationCommand::class,
49- "add:exception " => ExceptionCommand::class,
50- "add:middleware " => MiddlewareCommand::class,
45+ "clear " => ClearCommand::class,
46+ "migrate " => MigrationCommand::class,
47+ "migration:migrate " => MigrationCommand::class,
48+ "migration:rollback " => MigrationCommand::class,
49+ "migration:reset " => MigrationCommand::class,
50+ "add:controller " => GenerateControllerCommand::class,
51+ "add:configuration " => GenerateConfigurationCommand::class,
52+ "add:exception " => GenerateExceptionCommand::class,
53+ "add:middleware " => GenerateMiddlewareCommand::class,
5154 "add:migration " => MigrationCommand::class,
52- "add:model " => ModelCommand ::class,
55+ "add:model " => GenerateModelCommand ::class,
5356 "add:seeder " => SeederCommand::class,
54- "add:service " => ServiceCommand ::class,
57+ "add:service " => GenerateServiceCommand ::class,
5558 "add:validation " => ValidationCommand::class,
5659 "add:event " => AppEventCommand::class,
57- "add:listener " => EventListenerCommand ::class,
58- "add:producer " => ProducerCommand ::class,
59- "add:command " => ConsoleCommand ::class,
60- "add:message " => MessagingCommand ::class,
60+ "add:listener " => GenerateEventListenerCommand ::class,
61+ "add:producer " => GenerateProducerCommand ::class,
62+ "add:command " => GenerateConsoleCommand ::class,
63+ "add:message " => GenerateMessagingCommand ::class,
6164 "run:console " => ReplCommand::class,
6265 "run:server " => ServerCommand::class,
6366 "run:worker " => WorkerCommand::class,
@@ -97,7 +100,7 @@ public function call(string $command, string $action, ...$rest): mixed
97100 $ this ->throwFailsCommand ("The command $ command not found ! " );
98101 }
99102
100- if (!preg_match ('/^(clear| migrate|migration): / ' , $ command )) {
103+ if (!preg_match ('/^(migrate|migration)/ ' , $ command )) {
101104 $ method = "run " ;
102105 } else {
103106 $ method = $ action ;
0 commit comments