getDatabaseName(); $output->writeln("Tabelas no banco de dados: {$dbName}"); $tables = $connection->select('SHOW TABLES'); $key = "Tables_in_{$dbName}"; if (empty($tables)) { $output->writeln('Nenhuma tabela encontrada no banco de dados.'); return Command::SUCCESS; } $table = new Table($output); $table->setHeaders(['Tabela', 'Total de Registros']); foreach ($tables as $t) { $tableName = $t->$key; $count = $connection->table($tableName)->count(); $table->addRow([$tableName, $count]); } $table->render(); $output->writeln("Total de tabelas: " . count($tables) . ""); return Command::SUCCESS; } }