diff --git a/composer.json b/composer.json index 95ab08f..d1e7446 100644 --- a/composer.json +++ b/composer.json @@ -23,12 +23,5 @@ "laravel": { "providers": [] } - }, - "require": { - "laravel/framework": "^11|^12" - }, - "require-dev": { - "orchestra/testbench": "^4.8.0", - "phpunit/phpunit": "^8.3" } } \ No newline at end of file diff --git a/src/JsonField.php b/src/JsonField.php index 16abc06..f8ddb30 100644 --- a/src/JsonField.php +++ b/src/JsonField.php @@ -25,9 +25,9 @@ public function toEloquent($connection = null) // Convert to Laravel Database Json Syntax $value = str_replace('.', '->', $this->field); if (is_a($grammar, MySqlGrammar::class)) { - return $connection->raw((new \ProcessMaker\Query\Grammars\MySqlGrammar)->wrapJsonSelector($value)); + return $connection->raw((new Grammars\MySqlGrammar($connection))->wrapJsonSelector($value)); } elseif (is_a($grammar, SQLiteGrammar::class)) { - return $connection->raw((new \ProcessMaker\Query\Grammars\SQLiteGrammar)->wrapJsonSelector($value)); + return $connection->raw((new Grammars\SQLiteGrammar($connection))->wrapJsonSelector($value)); } else { throw new UnsupportedQueryGrammarException(); }