mirror of
https://github.com/barryvdh/laravel-ide-helper.git
synced 2026-08-18 01:57:13 +00:00
Allow for proper database resolve with schemas (#1349)
* Allow for proper database resolve with schemas * Remove need to explode database and table name
This commit is contained in:
@@ -463,6 +463,7 @@ class ModelsCommand extends Command
|
||||
*/
|
||||
public function getPropertiesFromTable($model)
|
||||
{
|
||||
$database = $model->getConnection()->getName();
|
||||
$table = $model->getConnection()->getTablePrefix() . $model->getTable();
|
||||
$schema = $model->getConnection()->getDoctrineSchemaManager();
|
||||
$databasePlatform = $schema->getDatabasePlatform();
|
||||
@@ -482,11 +483,6 @@ class ModelsCommand extends Command
|
||||
$databasePlatform->registerDoctrineTypeMapping($yourTypeName, $doctrineTypeName);
|
||||
}
|
||||
|
||||
$database = null;
|
||||
if (strpos($table, '.')) {
|
||||
[$database, $table] = explode('.', $table);
|
||||
}
|
||||
|
||||
$columns = $schema->listTableColumns($table, $database);
|
||||
|
||||
if (!$columns) {
|
||||
|
||||
Reference in New Issue
Block a user