HerrHase 2514bdc82e | 3 years ago | |
---|---|---|
src | 3 years ago | |
.gitignore | 3 years ago | |
LICENSE | 3 years ago | |
README.md | 3 years ago | |
composer.json | 3 years ago | |
composer.lock | 3 years ago |
This Version is in a early Stage and only supports get, post, patch for Items. Authentification is only possible with token.
composer require tentakelfabrik/pirectus
require('vendor/autoload.php');
use Pirectus\Pirectus;
use Pirectus\Auth\TokenAuth;
$pirectus = new Pirectus('<directus-url>', [
'auth' => new TokenAuth('<directus-authtoken>')
]);
$results = $pirectus
->items('pages')
->fields(['id', 'title', 'content'])
->filter([
'status' => ['_eq' => 'published']
])
->find();