PHP code example of shift31 / laravel-elasticsearch
1. Go to this page and download the library: Download shift31/laravel-elasticsearch library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
shift31 / laravel-elasticsearch example snippets
\Config::get('shift31::elasticsearch');
$searchParams['index'] = 'your_index';
$searchParams['size'] = 50;
$searchParams['body']['query']['query_string']['query'] = 'foofield:barstring';
$result = Es::search($searchParams);
$ php artisan config:publish shift31/laravel-elasticsearch