Skip to content

Commit a5a7e0a

Browse files
authored
Merge pull request #1 from lucacri/copilot/fix-2913531-754326037-1bd98e9d-ef32-48c5-96a8-61560486375a
fix: Pass connection to Grammar constructors for Laravel 12 compatibility
2 parents b2f292c + 64bd6e7 commit a5a7e0a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CockroachDbConnection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class CockroachDbConnection extends PostgresConnection implements ConnectionInte
2222
*/
2323
protected function getDefaultQueryGrammar(): BaseGrammar
2424
{
25-
return $this->withTablePrefix($this->setConnection(new QueryGrammar()));
25+
return $this->withTablePrefix($this->setConnection(new QueryGrammar($this)));
2626
}
2727

2828
/**
@@ -46,7 +46,7 @@ public function getSchemaBuilder(): DbBuilder
4646
*/
4747
protected function getDefaultSchemaGrammar(): BaseGrammar
4848
{
49-
return $this->withTablePrefix($this->setConnection(new SchemaGrammar()));
49+
return $this->withTablePrefix($this->setConnection(new SchemaGrammar($this)));
5050
}
5151

5252
/**

0 commit comments

Comments
 (0)