File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -38,12 +38,15 @@ public function handle(): bool
38
38
$ mysqldumpSkipTzUtc = config ('dbsync.mysqldumpSkipTzUtc ' ) ? '--skip-tz-utc ' : '' ;
39
39
40
40
$ targetConnection = config ('dbsync.targetConnection ' );
41
+ $ defaultConnection = config ('database.default ' );
41
42
42
- $ localUsername = config ('database.connections.mysql.username ' );
43
- $ localPassword = config ('database.connections.mysql.password ' );
44
- $ localHostname = config ('database.connections.mysql.host ' );
45
- $ localPort = config ('database.connections.mysql.port ' );
46
- $ localDatabase = config ('database.connections.mysql.database ' );
43
+ $ defaultConnection = empty ($ targetConnection ) ? $ defaultConnection : $ targetConnection ;
44
+
45
+ $ localUsername = config ("database.connections. {$ defaultConnection }.username " );
46
+ $ localPassword = config ("database.connections. {$ defaultConnection }.password " );
47
+ $ localHostname = config ("database.connections. {$ defaultConnection }.host " );
48
+ $ localPort = config ("database.connections. {$ defaultConnection }.port " );
49
+ $ localDatabase = config ("database.connections. {$ defaultConnection }.database " );
47
50
$ localMysqlPath = config ('dbsync.localMysqlPath ' );
48
51
49
52
if (empty ($ host ) || empty ($ username ) || empty ($ database )) {
You can’t perform that action at this time.
0 commit comments