1. Go to this page and download the library: Download pomirleanu/eloquent-elastic 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/ */
/*
|--------------------------------------------------------------------------
| Default Index Name
|--------------------------------------------------------------------------
|
*/
'default_index' => 'my_app_index',
namespace App;
use Illuminate\Database\Eloquent\Model as BaseModel;
use Elodex\Contracts\IndexedModel as IndexedModelContract;
use Elodex\IndexedModel as IndexedModelTrait;
class Model extends BaseModel implements IndexedModelContract
{
use IndexedModelTrait;