ElasticSearch-php 2 Facade
, (*1)
Facade for elasticsearch-php2, (*2)
Install
Require this package with Composer (Packagist), using the following command:, (*3)
``` bash
$ composer require media24si/eswrapper, (*4)
Register the ESWrapperServiceProvider to the providers array in `config/app.php`
``` php
Media24si\ESWrapper\ESWrapperServiceProvider::class,
Publish vendor files (config file):
``` bash
$ php artisan vendor:publish, (*5)
**Optional**
Register the facade in `config/app.php`:
``` php
'Elastic' => Media24si\ESWrapper\Facades\ESWrapper::class
Usage
You can use this package without any configuration. Just use the \Elastic facade in your controller., (*6)
Call your endpoints, like you would a normal elasticsearch client:
php
\Elastic::get([
'index' => 'my_index',
'type' => 'my_type',
'id' => 'my_id'
]);, (*7)
License
The MIT License (MIT). Please see License File for more information., (*8)