PHPackages                             theplanworks/directus-laravel - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. theplanworks/directus-laravel

ActiveLibrary[API Development](/categories/api)

theplanworks/directus-laravel
=============================

A Package to integrate Laravel 5.4 and the Directus API

1.0.2(9y ago)6875↓100%1MITPHP

Since Feb 28Pushed 9y ago2 watchersCompare

[ Source](https://github.com/theplanworks/directus-laravel)[ Packagist](https://packagist.org/packages/theplanworks/directus-laravel)[ RSS](/packages/theplanworks-directus-laravel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (4)Used By (0)

 [![Latest Stable Version](https://camo.githubusercontent.com/4f8996078953e29f978173b8afaf4a617ad5bfcd2037cb81a6a21caec3ea54cb/68747470733a2f2f706f7365722e707567782e6f72672f746865706c616e776f726b732f64697265637475732d6c61726176656c2f762f737461626c652e737667)](https://packagist.org/packages/theplanworks/directus-laravel) [![Total Downloads](https://camo.githubusercontent.com/dd53144a9fb5b0e4339a22ee9418b931b17d403dac198374e1c151cda5465cea/68747470733a2f2f706f7365722e707567782e6f72672f746865706c616e776f726b732f64697265637475732d6c61726176656c2f642f746f74616c2e737667)](https://packagist.org/packages/theplanworks/directus-laravel) [![License](https://camo.githubusercontent.com/641d514fdbf4aeee08f7de90bda5e59085f582e913a8897d405970843c35ed05/68747470733a2f2f706f7365722e707567782e6f72672f746865706c616e776f726b732f64697265637475732d6c61726176656c2f6c6963656e73652e737667)](https://packagist.org/packages/theplanworks/directus-laravel)

Directus API Wrapper for Laravel 5
==================================

[](#directus-api-wrapper-for-laravel-5)

This package allows users to easily consume the REST API provided by the [Directus](https://getdirectus.com) Headless CMS system in any Laravel app.

Installation
------------

[](#installation)

Install via [composer](https://getcomposer.org) using the command line:

```
composer require theplanworks/directus-laravel
```

In Laravel 5, update the `config/app.php` providers array with the Service Provider:

```
thePLAN\DirectusLaravel\DirectusLaravelServiceProvider::class,
```

### Configuration

[](#configuration)

By default, the package is set up to use the following configuration values read from your `.env` file:

- `DIRECTUS_CMS_URL` - The base URL of your CMS instance.
- `DIRECTUS_API_KEY` - The key generated by the CMS and associated with a valid user that authenticates requests

If you would like to use a config file, you can publish the default config by running the following command:

```
php artisan vendor:publish --provider="thePLAN\DirectusLaravel\DirectusLaravelServiceProvider"
```

This will publish a config file to `config/directus-laravel.php`.

Usage
-----

[](#usage)

To utilize the API Wrapper, use dependency injection to resolve:

```
public function __construct(DirectusLaravel $directusAPI)
{
    $this->api = $directusAPI;
}
```

Then you can make the following calls:

### getTableRows

[](#gettablerows)

```
$value = $this->api->getTableRows($table);
```

Where `$table` is the name of the Directus table you would like to access.

### getTableRow

[](#gettablerow)

```
$value = $this->api->getTableRow($table, $id);
```

Where `$table` is the name of the Directus table you would like to access, and `$id` is the unique ID of the record being requested.

### getTableRowBySlug

[](#gettablerowbyslug)

```
$value = $this->api->getTableRowBySlug($table, $slug)
```

Where `$table` is the name of the Directus table you would like to access, and `$slug` is the unique slug property of the record being requested. PREREQUISITE: A `slug` field must have been created on the table.

### getFile

[](#getfile)

```
$this->api->getFile($url);
```

Where `$url` is the file url you would like to return, such as `/storage/uploads/00000000001.png`.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

3359d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e164d93e7584845be7a88914c53229d9ae504db25bb82abf04946775ae6de7f7?d=identicon)[mixaster](/maintainers/mixaster)

---

Top Contributors

[![mixaster](https://avatars.githubusercontent.com/u/3452655?v=4)](https://github.com/mixaster "mixaster (15 commits)")

---

Tags

directuslaravelphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/theplanworks-directus-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/theplanworks-directus-laravel/health.svg)](https://phpackages.com/packages/theplanworks-directus-laravel)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
