Skip to content

Commit 3473720

Browse files
authored
Support site based indexes (#29)
1 parent 416ad1c commit 3473720

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/Meilisearch/Index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ class Index extends BaseIndex
1414
{
1515
protected $client;
1616

17-
public function __construct(Client $client, $name, $config)
17+
public function __construct(Client $client, $name, array $config, string $locale = null)
1818
{
1919
$this->client = $client;
2020

21-
parent::__construct($name, $config);
21+
parent::__construct($name, $config, $locale);
2222
}
2323

2424
public function search($query)

src/ServiceProvider.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ class ServiceProvider extends AddonServiceProvider
1111
{
1212
public function bootAddon()
1313
{
14-
Search::extend('meilisearch', function (Application $app, array $config, $name) {
14+
Search::extend('meilisearch', function (Application $app, array $config, $name, $locale = null) {
1515
$client = $app->makeWith(Client::class, [
1616
'url' => $config['credentials']['url'],
1717
'apiKey' => $config['credentials']['secret'],
@@ -21,6 +21,7 @@ public function bootAddon()
2121
'client' => $client,
2222
'name' => $name,
2323
'config' => $config,
24+
'locale' => $locale,
2425
]);
2526
});
2627
}

0 commit comments

Comments
 (0)