diff --git a/config/scout.php b/config/scout.php index 80aa42b5..d3c503b7 100644 --- a/config/scout.php +++ b/config/scout.php @@ -175,30 +175,30 @@ 'retry_interval_seconds' => env('TYPESENSE_RETRY_INTERVAL_SECONDS', 1), ], 'collection-settings' => [ -// User::class => [ -// 'schema' => [ -// 'fields' => [ -// [ -// 'name' => 'id', -// 'type' => 'string', -// ], -// [ -// 'name' => 'name', -// 'type' => 'string', -// ], -// [ -// 'name' => 'created_at', -// 'type' => 'int64', -// ], -// ], -// 'default_sorting_field' => 'created_at', -// ], -// 'search-options' => [ -// 'query_by' => [ -// 'name', -// ], -// ], -// ], + // User::class => [ + // 'schema' => [ + // 'fields' => [ + // [ + // 'name' => 'id', + // 'type' => 'string', + // ], + // [ + // 'name' => 'name', + // 'type' => 'string', + // ], + // [ + // 'name' => 'created_at', + // 'type' => 'int64', + // ], + // ], + // 'default_sorting_field' => 'created_at', + // ], + // 'search-options' => [ + // 'query_by' => [ + // 'name', + // ], + // ], + // ], ], ], ]; diff --git a/src/Engines/TypesenseEngine.php b/src/Engines/TypesenseEngine.php index 69629e32..12282789 100644 --- a/src/Engines/TypesenseEngine.php +++ b/src/Engines/TypesenseEngine.php @@ -511,7 +511,7 @@ protected function getOrCreateCollectionFromModel($model): TypesenseCollection } catch (ObjectNotFound $exception) { $schema = config('scout.typesense.collection-settings.'.get_class($model).'.schema') ?? []; - if (!isset($schema['name'])) { + if (! isset($schema['name'])) { $schema['name'] = $model->searchableAs(); }