Код: Выделить всё
php artisan scout:import App\\Models\\Module
Код: Выделить всё
Parameter fields is required.
at vendor/typesense/typesense-php/src/ApiCall.php:344
И toSearchableArray() есть ли:
Код: Выделить всё
public function toSearchableArray()
{
return array_merge($this->toArray(), [
'id' => (string) $this->id,
'model' => $this->model,
'created_at' => $this->created_at->timestamp,
]);
}
Код: Выделить всё
Module::class => [
'collection-schema' => [
'fields' => [
[
'name' => 'id',
'type' => 'string',
],
[
'name' => 'uuid',
'type' => 'string',
],
[
'name' => 'created_at',
'type' => 'int64',
],
],
'default_sorting_field' => 'created_at',
],
'search-parameters' => [
'query_by' => 'uuid'
],
]
Код: Выделить всё
curl http://localhost:8108/health
{"ok":true}
Код: Выделить всё
php artisan optimize:clear
Подробнее здесь: https://stackoverflow.com/questions/780 ... s-required