You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
570 B

3 years ago
  1. # Pirectus - a small Client for Directus 9
  2. This Client Supports Directus 9, it is written in PHP and use Guzzle for handling requests.
  3. In this Version
  4. ## Installation
  5. ```php
  6. ```
  7. ## Quickstart
  8. ```php
  9. require('vendor/autoload.php');
  10. use Pirectus\Pirectus;
  11. use Pirectus\Auth\TokenAuth;
  12. $pirectus = new Pirectus('<directus-url>', [
  13. 'auth' => new TokenAuth('<directus-authtoken>')
  14. ]);
  15. ```
  16. ```php
  17. $results = $pirectus
  18. ->items('pages')
  19. ->fields(['id', 'title', 'content'])
  20. ->filter([
  21. 'status' => ['_eq' => 'published']
  22. ])
  23. ->find();
  24. ```