File tree Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Expand file tree Collapse file tree 3 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,10 @@ 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+ });
6872 }
6973
7074 /**
Original file line number Diff line number Diff line change @@ -25,12 +25,12 @@ public static function connection($name)
2525 }
2626
2727 /**
28- * Get a schema builder instance for the default connection .
28+ * Get the registered name of the component .
2929 *
30- * @return \Illuminate\Database\Schema\Builder
30+ * @return string
3131 */
3232 protected static function getFacadeAccessor ()
3333 {
34- return static :: $ app [ 'db ' ]-> connection ()-> getSchemaBuilder () ;
34+ return 'db.schema ' ;
3535 }
3636}
Original file line number Diff line number Diff line change @@ -32,6 +32,9 @@ public function setUp()
3232
3333 $ container = new \Illuminate \Container \Container ;
3434 $ container ->instance ('db ' , $ db ->getDatabaseManager ());
35+ $ container ->bind ('db.schema ' , function ($ c ) {
36+ return $ c ['db ' ]->connection ()->getSchemaBuilder ();
37+ });
3538 \Illuminate \Support \Facades \Facade::setFacadeApplication ($ container );
3639
3740 $ this ->migrator = new Migrator (
You can’t perform that action at this time.
0 commit comments