PHPackages                             nikba/directus-api-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. [HTTP &amp; Networking](/categories/http)
4. /
5. nikba/directus-api-laravel

ActiveLibrary[HTTP &amp; Networking](/categories/http)

nikba/directus-api-laravel
==========================

Directus v8.8.1 API Wrapper for Laravel 10.x

v1.1(2y ago)424↓33.3%MITPHPPHP ^7.4|^8.2

Since Oct 15Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Nikba-Creative-Studio/directus-api-laravel)[ Packagist](https://packagist.org/packages/nikba/directus-api-laravel)[ RSS](/packages/nikba-directus-api-laravel/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel 10.x Directus API Wrapper
=================================

[](#laravel-10x-directus-api-wrapper)

[![Packagist Version](https://camo.githubusercontent.com/56d90f0659c2a06c8912d1dd112d2a1f5520fa85268ca9210d7e2cd229201a28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b62612f64697265637475732d6170692d6c61726176656c)](https://camo.githubusercontent.com/56d90f0659c2a06c8912d1dd112d2a1f5520fa85268ca9210d7e2cd229201a28/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b62612f64697265637475732d6170692d6c61726176656c)[![Directus Version](https://camo.githubusercontent.com/90d8b36170b76fba146d84bb7a18c894d374903d3af9fee3698a385088d174c5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64697265637475732d76382e382e312d626c7565)](https://camo.githubusercontent.com/90d8b36170b76fba146d84bb7a18c894d374903d3af9fee3698a385088d174c5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f64697265637475732d76382e382e312d626c7565)[![Laravel Version](https://camo.githubusercontent.com/adc77cfc20b5593f00aacfd3d4aba13d49c15a0546a068af98ef1cdc96af75fd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d7631302d626c7565)](https://camo.githubusercontent.com/adc77cfc20b5593f00aacfd3d4aba13d49c15a0546a068af98ef1cdc96af75fd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c61726176656c2d7631302d626c7565)

This package simplifies the consumption of the Directus Headless CMS REST API within Laravel applications.

If you're seeking an API Wrapper for Directus without using Laravel, please refer to [nikba/directus-api](https://github.com/Nikba-Creative-Studio/directus-api).

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

[](#installation)

The recommended method for installing Directus-API is via [Composer](https://getcomposer.org/).

```
composer require nikba/directus-api-laravel
```

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

```
Nikba\Directus\Laravel\DirectusServiceProvider::class,
```

Configuration
-------------

[](#configuration)

By default, the package is configured to use the following values from your `.env` file:

- `DIRECTUS_URL` - The base URL of your Directus instance.
- `DIRECTUS_PROJECT` - The Directus project you wish to use.

### Authentication

[](#authentication)

You can provide authentication through:

1. `DIRECTUS_API_KEY` - The key generated by Directus associated with a user.

or

2. `DIRECTUS_USERNAME` - The Directus username. `DIRECTUS_PASSWORD` - The password for your Directus user.

If none of these authentication options are provided, guest access will be used.

### Laravel Configuration File

[](#laravel-configuration-file)

If you prefer using a configuration file, you can publish the default config by running this command:

```
php artisan vendor:publish --provider="Nikba\Directus\Laravel\DirectusServiceProvider"
```

This will create a config file at `config/directus.php`.

Usage
-----

[](#usage)

To use the API Wrapper, you can either use dependency injection to resolve it:

```
public function __construct(Directus $directus)
{
    $this->api = $directus;
}
```

Or use the helper function:

```
directus() // or directus('connection')
```

Understanding the API
---------------------

[](#understanding-the-api)

For a more in-depth understanding of how the API works, please refer to [nikba/directus-api](https://github.com/Nikba-Creative-Studio/directus-api/).

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 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 ~0 days

Total

2

Last Release

937d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bcd10cd5a6707af2160f69291d06ff63cada1a920921edf7e3a4bdca6950c84?d=identicon)[nikba](/maintainers/nikba)

---

Top Contributors

[![Nikba-Creative-Studio](https://avatars.githubusercontent.com/u/41567806?v=4)](https://github.com/Nikba-Creative-Studio "Nikba-Creative-Studio (4 commits)")

---

Tags

httpclientlaravelresthttp clientwrapperdirectus

### Embed Badge

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

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

###  Alternatives

[slimpay/hapiclient

An HTTP Client using HAL as the format for resources.

14317.3k](/packages/slimpay-hapiclient)[zoonman/pixabay-php-api

PixabayClient is a PHP HTTP client library to access Pixabay's API

3354.7k](/packages/zoonman-pixabay-php-api)[laragear/api-manager

Manage multiple REST servers to make requests in few lines and fluently.

161.8k](/packages/laragear-api-manager)

PHPackages © 2026

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