File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -65,10 +65,6 @@ protected function registerConnectionServices()
6565 $ this ->app ->bind ('db.connection ' , function ($ app ) {
6666 return $ app ['db ' ]->connection ();
6767 });
68-
69- $ this ->app ->bind ('db.schema ' , function ($ app ) {
70- return $ app ['db ' ]->connection ()->getSchemaBuilder ();
71- });
7268 }
7369
7470 /**
Original file line number Diff line number Diff line change @@ -159,11 +159,15 @@ protected static function getFacadeAccessor()
159159 /**
160160 * Resolve the facade root instance from the container.
161161 *
162- * @param string $name
162+ * @param object| string $name
163163 * @return mixed
164164 */
165165 protected static function resolveFacadeInstance ($ name )
166166 {
167+ if (is_object ($ name )) {
168+ return $ name ;
169+ }
170+
167171 if (isset (static ::$ resolvedInstance [$ name ])) {
168172 return static ::$ resolvedInstance [$ name ];
169173 }
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ public static function connection($name)
2525 }
2626
2727 /**
28- * Get the registered name of the component .
28+ * Get a schema builder instance for the default connection .
2929 *
30- * @return string
30+ * @return \Illuminate\Database\Schema\Builder
3131 */
3232 protected static function getFacadeAccessor ()
3333 {
34- return 'db.schema ' ;
34+ return static :: $ app [ 'db ' ]-> connection ()-> getSchemaBuilder () ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -37,10 +37,6 @@ protected function setUp(): void
3737 $ container = new Container ;
3838 $ container ->instance ('db ' , $ db ->getDatabaseManager ());
3939
40- $ container ->bind ('db.schema ' , function ($ c ) {
41- return $ c ['db ' ]->connection ()->getSchemaBuilder ();
42- });
43-
4440 Facade::setFacadeApplication ($ container );
4541
4642 $ this ->migrator = new Migrator (
You can’t perform that action at this time.
0 commit comments