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

Commit

Permalink
Upd package for MeiliSearch v0.11 (#27)
Browse files Browse the repository at this point in the history
* Upd version

* Change index creation according to new createIndex prototype
  • Loading branch information
curquiza authored Jun 30, 2020
1 parent 4a108c8 commit 88b2bba
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ class BookController extends Controller
## Compatibility with MeiliSearch

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

## Development Workflow

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"require": {
"php": "^7.2.5",
"laravel/scout": "^8.0",
"meilisearch/meilisearch-php": "^0.9|^0.10"
"meilisearch/meilisearch-php": "^0.11"
},
"require-dev": {
"orchestra/testbench": "^5.0",
Expand Down
12 changes: 6 additions & 6 deletions src/Console/IndexMeilisearch.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@ public function handle()
return;
}

$index = $this->argument('name');
$creation_options = [];
if ($this->option('key')) {
$index = [
'uid' => $this->argument('name'),
'primaryKey' => $this->option('key'),
];
$creation_options = ['primaryKey' => $this->option('key')];
}
$client->createIndex($index);
$client->createIndex(
$this->argument('name'),
$creation_options
);
$this->info('Index "'.$this->argument('name').'" created.');
} catch (HTTPRequestException $exception) {
$this->error($exception->getMessage());
Expand Down

0 comments on commit 88b2bba

Please sign in to comment.