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