directus9-laravel maintained by marnick-s
Description
A Directus 9 SDK for Laravel
Author
Last update
2022/12/28 14:47
(dev-master)
License
Downloads
10
A Directus 9 SDK for Laravel
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.