From 9d8d2c945381e86239ef9073ef1719ccc897b425 Mon Sep 17 00:00:00 2001 From: Aleksei Lebedev <1329824+LastDragon-ru@users.noreply.github.com> Date: Tue, 17 Oct 2023 09:22:22 +0400 Subject: [PATCH] refactor(graphql): `TestObject` marked as `Searchable`. --- .../graphql/src/SearchBy/Operators/Comparison/ContainsTest.php | 2 +- packages/graphql/src/Testing/Package/Data/Models/TestObject.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/graphql/src/SearchBy/Operators/Comparison/ContainsTest.php b/packages/graphql/src/SearchBy/Operators/Comparison/ContainsTest.php index 4c63fa3bd..8b52fec5b 100644 --- a/packages/graphql/src/SearchBy/Operators/Comparison/ContainsTest.php +++ b/packages/graphql/src/SearchBy/Operators/Comparison/ContainsTest.php @@ -47,7 +47,7 @@ public function testCall( $grammar = new $grammar(); if ($builder instanceof EloquentBuilder) { - $builder->toBase()->grammar = $grammar; + $builder->getQuery()->grammar = $grammar; } else { $builder->grammar = $grammar; } diff --git a/packages/graphql/src/Testing/Package/Data/Models/TestObject.php b/packages/graphql/src/Testing/Package/Data/Models/TestObject.php index 4bdc5c667..c4cf7eec8 100644 --- a/packages/graphql/src/Testing/Package/Data/Models/TestObject.php +++ b/packages/graphql/src/Testing/Package/Data/Models/TestObject.php @@ -5,6 +5,7 @@ use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; +use Laravel\Scout\Searchable; use LastDragon_ru\LaraASP\Eloquent\Concerns\WithoutTimestamps; /** @@ -15,6 +16,7 @@ */ class TestObject extends Model { use HasFactory; + use Searchable; use WithoutTimestamps; /**