diff --git a/modules/Common/Repository/Options/Schemas.php b/modules/Common/Repository/Options/Schemas.php index aea70c7..8debc8b 100644 --- a/modules/Common/Repository/Options/Schemas.php +++ b/modules/Common/Repository/Options/Schemas.php @@ -12,9 +12,11 @@ class Schemas implements OptionInterface { $options = []; - $tablePrefix = DB::connection()->getTablePrefix(); + $connection = DB::connection(); + $databaseName = $connection->getDatabaseName(); + $tablePrefix = $connection->getTablePrefix(); - foreach (Schema::getTables() as $table) { + foreach (Schema::getTables($databaseName) as $table) { $tableName = Str::of($table['name'])->remove($tablePrefix); $options[] = [