-
Notifications
You must be signed in to change notification settings - Fork 33
Installation
First, install MeiliSearch Bundle Integration via the composer package manager:
$ composer require meilisearch/search-bundle symfony/http-client nyholm/psr7You could use any PSR-18 compatible client to use with this SDK. No additional configurations are required. A list of compatible HTTP clients and client adapters can be found at php-http.org.
The bundle is registered automatically. If it does not register, add the following entry to config/bundles.php.
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
// ... Other bundles ...
MeiliSearch\Bundle\MeiliSearchBundle::class => ['all' => true],
];You will also need to provide the MeiliSearch URL and Master key.
By default, they are loaded from environment variables MEILISEARCH_URL and MEILISEARCH_MASTER_KEY.
If you use .env config file, you can set them there.
MEILISEARCH_URL=http://127.0.0.1:7700
MEILISEARCH_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIf you don't use environment variables, you can set them in your parameters.yml.
parameters:
env(MEILISEARCH_URL): http://127.0.0.1:7700
env(MEILISEARCH_API_KEY): xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxFor more information about authentication, see documentation here: https://docs.meilisearch.com/guides/advanced_guides/authentication.html