[ 'scan' => [ 'paths' => [ __DIR__, ], ], ], 'commands' => [ ...$this->getDatabaseCommands(), ], 'publish' => [ [ 'id' => 'config', 'description' => 'The config for devtool.', 'source' => __DIR__ . '/../publish/devtool.php', 'destination' => BASE_PATH . '/config/autoload/devtool.php', ], ], ]; } private function getDatabaseCommands(): array { if (! class_exists(CommandCollector::class)) { return []; } return CommandCollector::getAllCommands(); } }