PHP code example of krisanalfa / ductible
1. Go to this page and download the library: Download krisanalfa/ductible 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/ */
krisanalfa / ductible example snippets
'providers' => [
// ...
Zeek\Ductible\DuctibleServiceProvider::class,
],
'aliases' => [
// ...
'Ductible' => Zeek\Ductible\Facades\Ductible::class,
],
$result = Ductible::index([
'index' => 'myIndex',
'type' => 'myType',
'id' => 1,
'body' => [
'fieldFoo' => 'Foo',
'fieldBar' => 'Bar',
'fieldBaz' => 'Baz',
],
]);
$index = Ductible::get([
'index' => 'myIndex',
'type' => 'type',
'id' => 1,
]); // The result is an array
$result = Ductible::index([
'index' => 'myIndex',
'type' => 'myType',
'id' => 1,
'body' => [
'fieldFoo' => 'Foo Foo',
'fieldBar' => 'Bar Bar',
'fieldBaz' => 'Baz Baz',
],
]);
$index = Ductible::delete([
'index' => 'myIndex',
'type' => 'type',
'id' => 1,
]); // The result is an array
$result = Ductible::search($searchParams);
$result = Ductible::bulk($searchParams);
sh
php artisan vendor:publish --provider="Zeek\Ductible\DuctibleServiceProvider"