Fix environment-based selection of Query Parser

This commit is contained in:
Sobuno
2025-01-02 20:03:39 +01:00
parent 92f5cca65b
commit c44b827922
2 changed files with 6 additions and 2 deletions

View File

@@ -48,8 +48,8 @@ class SearchServiceProvider extends ServiceProvider
{
$this->app->bind(
QueryParserInterface::class,
static function () {
$implementation = env('QUERY_PARSER_IMPLEMENTATION', 'default');
static function (): GdbotsQueryParser|QueryParser {
$implementation = config('search.query_parser');
return match($implementation) {
'new' => app(QueryParser::class),