diff --git a/src/Illuminate/Database/Console/TableCommand.php b/src/Illuminate/Database/Console/TableCommand.php index 7101879a3920..6422a07f6406 100644 --- a/src/Illuminate/Database/Console/TableCommand.php +++ b/src/Illuminate/Database/Console/TableCommand.php @@ -52,6 +52,10 @@ public function handle(ConnectionResolverInterface $connections) collect($schema->listTables())->flatMap(fn (Table $table) => [$table->getName()])->toArray() ); + if (! $schema->tablesExist([$table])) { + return $this->components->warn("Table [{$table}] doesn't exist."); + } + $table = $schema->listTableDetails($table); $columns = $this->columns($table);