Elastic App Search driver for Laravel Scout.
The current version of Elastic App Scout Driver has been tested with the following configuration:
- PHP 7.2-7.4
- Elasticsearch 7.0-7.6
- Laravel 6.x-7.x
- Laravel Scout 7.x-8.x
- Laravel Scout
- Elasticsearch 7.0-7.6
- App Search 7.0-7.6
The library can be installed via Composer:
composer require u12206050/elastic-app-scout-driver
Change the driver
option in the config/scout.php
file to elastic_app
php artisan vendor:publish --provider="ElasticAppScoutDriver\ServiceProvider"
Add your Elastic App Search url and key to you .env
file
ELASTIC_APP_ENDPOINT=
ELASTIC_APP_KEY=
This driver uses Elastic App Search Meaning you can have alot more flexible where clauses available READ MORE
$orders = App\Order::search('')->where('created_at', [
'from' => '2020-01-01T12:00:00+00:00',
'to' => '2020-12-31T12:00:00+00:00'
]);
When the query string is omitted, then all records are returned.
$orders = App\Order::search()->where('user_id', 1)->get();
Please refer to the official Laravel Scout documentation and the app search api for more details and usage examples.
All PRs and RFCs are very welcome.