PHPackages                             abellion/xenus-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. [Database &amp; ORM](/categories/database)
4. /
5. abellion/xenus-laravel

ActiveLibrary[Database &amp; ORM](/categories/database)

abellion/xenus-laravel
======================

Xenus integration for the Laravel and Lumen frameworks

0.4(4y ago)92.8kMITPHPPHP ^7.1.3 || ^8.0CI failing

Since Aug 3Pushed 4y ago1 watchersCompare

[ Source](https://github.com/abellion/xenus-laravel)[ Packagist](https://packagist.org/packages/abellion/xenus-laravel)[ RSS](/packages/abellion-xenus-laravel/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (9)Versions (6)Used By (0)

 [ ![](https://camo.githubusercontent.com/02dea99c5089c7a638fdadbdf2031e55c207eb1ddd77ed83e1bbfde66813da6b/68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f6162656c6c696f6e2f696d6167652f75706c6f61642f635f7363616c652c775f3330302f76313533353230323931362f6c6f676f5f696c707433732e706e67) ](https://abellion.github.io/xenus/)

This package integrates [Xenus](https://github.com/abellion/xenus) to the Laravel and Lumen frameworks (from version `5.8` up to the latest `9.0`) :

- Out of the box **failed jobs** and **migrations** integration
- Ready to work **event dispatcher**

> Xenus is a simple and elegant MongoDB ODM. Learn more :

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

[](#installation)

If you haven't already installed [Xenus](https://github.com/abellion/xenus), and thus satisfied its requirement to the `mongodb` extension, make sure to install the extension before requiring this package : Once installed, require the package :

```
composer require abellion/xenus-laravel
```

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

[](#configuration)

An instance of the `Xenus\Connection` class will automatically be constructed and registered inside the service container for you. To do so, Xenus reads the connection's settings from your `config/database.php` file under the `mongodb.connection` key. It must at least contain the `host` and the `database` you wish to connect to :

```
[
    'mongodb' => [
        'connection' => [
            'host' => 'mongodb://localhost:27017',
            'database' => 'my_database'
        ]
    ]
]
```

Service provider
----------------

[](#service-provider)

In order to configure your collections, that is linking them to the Laravel's event dispatcher and defining them as singleton inside the service container, you must create a service provider. This service provider must extend `Xenus\Laravel\XenusServiceProvider` and contain a `$collections` property holding your collections :

```
use Xenus\Laravel\XenusServiceProvider as ServiceProvider;

class XenusServiceProvider extends ServiceProvider
{
    protected $collections = [
        MyCollection::class
    ];
}
```

Failed jobs and migrations
--------------------------

[](#failed-jobs-and-migrations)

The failed jobs and migrations bridges come pre-configured and ready to work. If you want to change the default collections names they use, edit the following :

**For the migrations :**

```
// config/database.php

[
    'migrations' => 'my_migration_collection'
]
```

**For the failed jobs :**

```
// config/queue.php

[
    'failed' => [
        'collection' => 'my_failed_jobs_collection'
    ]
]
```

License
-------

[](#license)

Xenus is licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 98.8% 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 ~175 days

Total

5

Last Release

1462d ago

PHP version history (2 changes)0.1PHP ^7.1.3

0.3PHP ^7.1.3 || ^8.0

### Community

Maintainers

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

---

Top Contributors

[![abellion](https://avatars.githubusercontent.com/u/9916488?v=4)](https://github.com/abellion "abellion (85 commits)")[![kcalliauw](https://avatars.githubusercontent.com/u/1638303?v=4)](https://github.com/kcalliauw "kcalliauw (1 commits)")

---

Tags

laravellumenmongodbmongodb-odmodmphplaravellumenodmmongodbxenus

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abellion-xenus-laravel/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.2k95.4M307](/packages/laravel-horizon)[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M618](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M132](/packages/laravel-pulse)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M203](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)

PHPackages © 2026

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