marnick-s / directus9-laravel
A Directus 9 SDK for Laravel
1.0.0
2022-12-28 13:31 UTC
Requires
- php: ^7.4|^8.0
- alantiller/directus-php-sdk: ^1.0.3
This package is auto-updated.
Last update: 2025-02-28 18:18:14 UTC
README
This package makes it easier to use alantiller/directus-php-sdk with Laravel.
Just install the package by running
composer require marnick-s/directus9-laravel
and put this in your .env:
DIRECTUS_URL=https://directus.example.com
DIRECTUS_ACCESS_TOKEN=your-static-access-token-here
DIRECTUS_ACCESS_TOKEN
is optional.
Then, you can use it like this:
$api = new Directus();
$posts = $api->get_items('posts');
or, you can use the helper function:
$posts = directus()->get_items('posts');
See this readme for all the available methods.