-
Notifications
You must be signed in to change notification settings - Fork 1
3. Basic Usage
Osushi edited this page Sep 6, 2018
·
1 revision
<?php
use Osushi\ElasticsearchOrm\Model;
class Sample extends Model
{
protected $index = 'index';
protected $type = 'type';
// protected $mappings = [];
// protected $connection = 'default';
}
$sample = new Sample();
<?php
use Osushi\ElasticsearchOrm\Connection;
$es = Connection::create([
'servers' => [
[
"host" => '127.0.0.1',
"port" => 9200,
'user' => '',
'pass' => '',
'scheme' => 'http',
],
],
'logging' => [
'enabled' => false,
'level' => 'all',
'location' => base_path('storage/logs/elasticsearch.log'),
],
]);