mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Update ModelsCommand.php
Work with tables in different databases
This commit is contained in:
@@ -226,7 +226,12 @@ class ModelsCommand extends Command
|
||||
$databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName);
|
||||
}
|
||||
|
||||
$columns = $schema->listTableColumns($table);
|
||||
$database = null;
|
||||
if (strpos($table, '.')) {
|
||||
list($database, $table) = explode('.', $table);
|
||||
}
|
||||
|
||||
$columns = $schema->listTableColumns($table, $database);
|
||||
|
||||
if ($columns) {
|
||||
foreach ($columns as $column) {
|
||||
|
||||
Reference in New Issue
Block a user