File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Doctrine \DBAL \Types \Type ;
6
6
use Illuminate \Database \Connectors \ConnectionFactory ;
7
+ use Illuminate \Database \Events \ConnectionEstablished ;
7
8
use Illuminate \Support \Arr ;
8
9
use Illuminate \Support \ConfigurationUrlParser ;
9
10
use Illuminate \Support \Str ;
@@ -99,6 +100,12 @@ public function connection($name = null)
99
100
$ this ->connections [$ name ] = $ this ->configure (
100
101
$ this ->makeConnection ($ database ), $ type
101
102
);
103
+
104
+ if ($ this ->app ->bound ('events ' )) {
105
+ $ this ->app ['events ' ]->dispatch (
106
+ new ConnectionEstablished ($ this ->connections [$ name ])
107
+ );
108
+ }
102
109
}
103
110
104
111
return $ this ->connections [$ name ];
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ namespace Illuminate \Database \Events ;
4
+
5
+ class ConnectionEstablished extends ConnectionEvent
6
+ {
7
+ //
8
+ }
You can’t perform that action at this time.
0 commit comments