Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
karakhanyans committed Nov 10, 2023
1 parent e875e90 commit 4fa5bf8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
48 changes: 24 additions & 24 deletions config/scout.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
// ],
// ],
// ],
],
],
];
2 changes: 1 addition & 1 deletion src/Engines/TypesenseEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 4fa5bf8

Please sign in to comment.