PHPackages                             7ute/directavel - 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. [Admin Panels](/categories/admin)
4. /
5. 7ute/directavel

ActiveLibrary[Admin Panels](/categories/admin)

7ute/directavel
===============

Use Directus as a back-office for Laravel

v1.0.2(2y ago)111MITPHPPHP &gt;=8.1

Since Jun 11Pushed 2y ago1 watchersCompare

[ Source](https://github.com/7ute/directavel)[ Packagist](https://packagist.org/packages/7ute/directavel)[ Docs](https://github.com/7ute/directavel)[ RSS](/packages/7ute-directavel/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (8)Versions (4)Used By (0)

Directavel
==========

[](#directavel)

Directavel helps using [Directus](https://directus.io/) as an administrative backend for [Laravel](http://laravel.com). It provides some commands to programmatically define and version Directus collections, and sync them without touching your data tables.

![]()[![Tests](https://github.com/7ute/Directavel/workflows/tests/badge.svg)](https://github.com/7ute/Directavel/workflows/tests/badge.svg)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Latest Version](https://camo.githubusercontent.com/7fef00e575c7fa9d9621b2935c3ca97c67f1807002f9ab479fd76b942b0ef075/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f377574652f4469726563746176656c2e7376673f7374796c653d666c61742d737175617265)](https://github.com/7ute/Directavel/releases)

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

[](#installation)

Directavel requires [PHP](https://php.net) 8.0+, [Laravel](https://laravel.com/) 10.x+ and [Directus](https://directus.io/) 9.x+. To get the latest version, simply require the project using [Composer](https://getcomposer.org):

```
composer require 7ute/directavel
```

Once installed, if you are not using automatic package discovery, then you need to register the `SevenUte\Directavel\DirectavelServiceProvider` service provider in your `config/app.php`. You can also alias the facade:

```
        'Directavel' => SevenUte\Directavel\Facades\Directavel::class,
```

Directus must be installed and bootstraped, and the migrations must have been run already. You can bootstrap it by running the following **in the directus project directory** :

```
npx directus bootstrap
npx directus database migrate:latest
```

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

[](#configuration)

To customize the directus configuration, you first must publish the config.

```
$ php artisan vendor:publish
```

This will create a `config/directavel.php` file in your app that you can modify to set your configuration. Make sure you check for changes to the original config file in this package between releases.

Collections
-----------

[](#collections)

Each collection is defined by a PHP file named after the table we want to configure. The collections sits at the path set in the `directavel.collections_path_pattern` config entry.

A configuration files is composed as following :

```
// database/directus/collections/some_table.php

/**
 * That file will help generating a `some_table`
 * entry in the `directus_collections` table
 * with only the collection column filled.
 **/
return [
    /** The other columns of this `directus_collection` entry. */
    'attributes' => [],

    /** Each field will be its own row in the `directus_fields` table */
    'fields' => [],

    /**
     * The relationships that are not set in the fields
     * can be defined here. They will be inserted at
     * the end of the `directus_relations` table.
     **/
    'relations' => [],
]
```

To see an example, check the [sample.php](https://github.com/7ute/Directavel/blob/master/database/directus/collections/sample.php) file in this package. You can also refer to the [DirectusFields](https://github.com/7ute/Directavel/blob/master/src/Models/DirectusFields.php) model for a list of available fields and some typing for your IDE, and the [DirectusCollections](https://github.com/7ute/Directavel/blob/master/src/Models/DirectusCollections.php) and [DirectusRelations](https://github.com/7ute/Directavel/blob/master/src/Models/DirectusRelations.php) for the available columns.

Presets
-------

[](#presets)

The general presets can be defined in a file at the path set in the `directavel.presets_path` config entry. Some default config for the `directus_activity`, `directus_presets` and `directus_users` views are included in the [presets.php](https://github.com/7ute/Directavel/blob/master/database/directus/presets.php) file of this project.

Usage
-----

[](#usage)

Once the collections are configured, you can use the facade in a migration, or use the command to trigger a full refresh of Directus collections / fields without touching your non-directus data tables.

> **Warning**All your existing Activityn Collections, Fields, Presets, Relations and Revisions might be wiped, depending on your settings in the config file.

### Commands

[](#commands)

- `php artisan directavel:sync`: Update the admin user, settings and presets, and synchronises the collections and fields
- `php artisan directavel:cache:clear`: Clears Directus inner cache

### Facade

[](#facade)

```
use SevenUte\Directavel\Facades\Directavel;

Directavel::updateProjectAdmin()
    ->updateProjectPresets()
    ->updateThemeCss()
    ->synchronizeDatabase()
    ->clearCache();
```

- `updateProjectAdmin`: Updates the Directus admin user ;
- `updateProjectLog`: Updates the Directus logo ;
- `updateProjectPresets`: Reload the non-user presets from the file defined in the `directus.presets_path` config ;
- `updateThemeCss`: Applies the theme color and extra CSS ;
- `synchronizeDatabase`: Loads the collections, fields and relations into the directus tables, wiping those set in the `directus.wipe` config before ;
- `clearCache`: Clears Directus collection cache to prevent "inexistant field" errors ;
- `loadTailwindThemeColors`: Reloads the Tailwind theme colors ;
- `loadCurrentAdminId`: Reloads the Directus admin user ID.

Tests
-----

[](#tests)

This package is tested with [Pest](https://pestphp.com/). To run the tests, use `composer tests`.

Contributions
-------------

[](#contributions)

Pull requests are welcome. Pull requests with tests are even more welcome.

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Julien Cauvin at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

Directavel is licensed under [The MIT License (MIT)](LICENSE).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

3

Last Release

1068d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.0

v1.0.1PHP &gt;=8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/1e4dabb80d8cec66d3791cb3c81d028339261fa499f3b6906ee1098c7f481031?d=identicon)[7ute](/maintainers/7ute)

---

Top Contributors

[![7ute](https://avatars.githubusercontent.com/u/8693407?v=4)](https://github.com/7ute "7ute (13 commits)")

---

Tags

laraveldirectus7uteCauvin JulienLaratusDirectavel

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/7ute-directavel/health.svg)

```
[![Health](https://phpackages.com/badges/7ute-directavel/health.svg)](https://phpackages.com/packages/7ute-directavel)
```

###  Alternatives

[gecche/laravel-multidomain

Laravel App on a subdomains, multi-tenancy setting

1.1k227.8k6](/packages/gecche-laravel-multidomain)[conedevelopment/root

Root is an admin package for Laravel applications.

3713.1k2](/packages/conedevelopment-root)[weblabormx/laravel-front

Front is a administration panel for Laravel. It allows you to create CRUD easily in minutes. It allows to fully customize any part of the code.

1111.1k](/packages/weblabormx-laravel-front)

PHPackages © 2026

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