adobradi / laravel5-elastic
Simple Elastic wrapper for Laravel 5
Installs: 2 099
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 3
Open Issues: 0
Requires
- php: >=5.4.0
- elasticsearch/elasticsearch: ~2.0
- illuminate/support: ~5.0
This package is not auto-updated.
Last update: 2021-09-04 01:09:56 UTC
README
Simple Elastic wrapper for Laravel 5
This package was built on Elasticsearch/Elasticsearch. The only purpose of this package is to create a simpler way to use Elastic in Laravel 5.
Installation
First you'll have to add the package to your dependencies in your composer.json file.
{ "require": { "adobradi/laravel5-elastic": "~1.0" } }
Or just simply do composer require adobradi/laravel5-elastic ~1.0
in your project root.
Now you'll have to add the provider to the list in config/app.php
:
return [ // ... 'providers' => [ // ... 'Adobradi\Elastic\ElasticServiceProvider', // ... ] // ... ];
After this, the Elastic alias will be created and you'll be able to use the Elastic facade to make calls:
use Elastic; class YourClass { function yourFunction() { $data = Elastic::search([ 'index' => 'your_index_name', 'type' => 'article', 'size' => 15 ]); } }