Skip to content

Commit 6f5ba29

Browse files
committed
feat: autoinstall other module commands
1 parent 743d75d commit 6f5ba29

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

src/Sprout/Seedling.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,23 @@ public static function commands(): array
1616
Seedling\DeleteConsoleCommand::class,
1717
];
1818
}
19+
20+
public static function moduleCommands(): array
21+
{
22+
$commands = [];
23+
24+
if (class_exists('Leaf\Queue')) {
25+
$commands[] = \Leaf\Queue::commands();
26+
}
27+
28+
if (class_exists('Leaf\Billing')) {
29+
$commands[] = \Leaf\Billing::commands();
30+
}
31+
32+
if (class_exists('Leaf\Schema')) {
33+
$commands[] = \Leaf\Commands\DatabaseCommands::commands();
34+
}
35+
36+
return $commands;
37+
}
1938
}

0 commit comments

Comments
 (0)