A laravel service provider for the elasticsearch php client: https://github.com/elastic/elasticsearch-php
composer require triadev/laravel-elasticsearch-provider
The package is registered through the package discovery of laravel and Composer.
Once installed you can now publish your config file and set your correct configuration for using the package.
php artisan vendor:publish --provider="Triadev\Es\Provider\ElasticsearchServiceProvider" --tag="config"
This will create a file config/triadev-elasticsearch.php
.
Key | Env | Value | Description | Default |
---|---|---|---|---|
hosts | ELASTICSEARCH_HOSTS | STRING | Hosts | localhost |
retries | ELASTICSEARCH_RETRIES | INTEGER | operation retries | 3 |
Delimiter for different hosts: | (pipe)
http://localhost:9200/|https://username:password!#$?*[email protected]:9200/
If you do find an issue, please feel free to report it with GitHub's bug tracker for this project.
Alternatively, fork the project and make a pull request. :)
composer test
Please see CONTRIBUTING for details.
The code for LaravelElasticsearchProvider is distributed under the terms of the MIT license (see LICENSE).