PHP code example of timkley / weaviate-php
1. Go to this page and download the library: Download timkley/weaviate-php 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/ */
timkley / weaviate-php example snippets
use Weaviate\Weaviate;
$weaviate = new Weaviate('http://localhost:8080', 'your-token');
// using the GraphQL API
$weaviate->graphql()->get('{
Get {
Things {
Article {
title
}
}
}
}');
// using the `batch` REST API
$weaviate->batch()->create($objects);
// adding query parameters
$weaviate->dataObject()->withQueryParameters(['limit' => 10])->get();
bash
composer