File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ public function getSchemaBuilder()
32
32
*/
33
33
protected function getDefaultQueryGrammar ()
34
34
{
35
- return $ this ->withTablePrefix (new Query \Grammar );
35
+ $ grammar = new Query \Grammar ;
36
+ if (method_exists ($ grammar , 'setConnection ' )) {
37
+ $ grammar ->setConnection ($ this );
38
+ }
39
+ return $ this ->withTablePrefix ($ grammar );
36
40
}
37
41
38
42
/**
@@ -42,7 +46,11 @@ protected function getDefaultQueryGrammar()
42
46
*/
43
47
protected function getDefaultSchemaGrammar ()
44
48
{
45
- return $ this ->withTablePrefix (new Schema \Grammar );
49
+ $ grammar = new Schema \Grammar ;
50
+ if (method_exists ($ grammar , 'setConnection ' )) {
51
+ $ grammar ->setConnection ($ this );
52
+ }
53
+ return $ this ->withTablePrefix ($ grammar );
46
54
}
47
55
48
56
/**
You can’t perform that action at this time.
0 commit comments