Skip to content
This repository was archived by the owner on May 13, 2021. It is now read-only.

Commit 88b2bba

Browse files
authored
Upd package for MeiliSearch v0.11 (#27)
* Upd version * Change index creation according to new createIndex prototype
1 parent 4a108c8 commit 88b2bba

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ class BookController extends Controller
190190
## Compatibility with MeiliSearch
191191

192192
This package is compatible with the following MeiliSearch versions:
193-
- `v0.10.X`
193+
- `v0.11.X`
194194

195195
## Development Workflow
196196

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"require": {
1414
"php": "^7.2.5",
1515
"laravel/scout": "^8.0",
16-
"meilisearch/meilisearch-php": "^0.9|^0.10"
16+
"meilisearch/meilisearch-php": "^0.11"
1717
},
1818
"require-dev": {
1919
"orchestra/testbench": "^5.0",

src/Console/IndexMeilisearch.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ public function handle()
4141
return;
4242
}
4343

44-
$index = $this->argument('name');
44+
$creation_options = [];
4545
if ($this->option('key')) {
46-
$index = [
47-
'uid' => $this->argument('name'),
48-
'primaryKey' => $this->option('key'),
49-
];
46+
$creation_options = ['primaryKey' => $this->option('key')];
5047
}
51-
$client->createIndex($index);
48+
$client->createIndex(
49+
$this->argument('name'),
50+
$creation_options
51+
);
5252
$this->info('Index "'.$this->argument('name').'" created.');
5353
} catch (HTTPRequestException $exception) {
5454
$this->error($exception->getMessage());

0 commit comments

Comments
 (0)