File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,15 @@ private function getDynamicTableValues(): array
52
52
53
53
$ currentDBConnection = Schema::getConnection ()->getName ();
54
54
55
+ $ connection = Schema::getConnection ();
55
56
if ($ currentDBConnection !== $ this ->dynamicConnectionName ) {
56
- Schema::connection ($ this ->dynamicConnectionName );
57
+ $ connection = Schema::connection ($ this ->dynamicConnectionName )-> getConnection ( );
57
58
}
58
59
59
- if (! Schema:: hasTable ($ this ->dynamicTableName )) {
60
+ if (! $ connection -> getSchemaBuilder ()-> hasTable ($ this ->dynamicTableName )) {
60
61
throw DynamicModelException::tableDoesNotExist ($ this ->dynamicTableName );
61
62
}
62
63
63
- // get primary key, incrementing and key type
64
- $ connection = Schema::getConnection ();
65
-
66
64
$ table = $ connection ->getDoctrineSchemaManager ()->listTableDetails ($ this ->dynamicTableName );
67
65
68
66
if (! $ primaryKey = $ table ->getPrimaryKey ()) {
You can’t perform that action at this time.
0 commit comments