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(3y ago)92.8kMITPHPPHP ^7.1.3 || ^8.0CI failing

Since Aug 3Pushed 3y 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 3d 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 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

1409d 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

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[leroy-merlin-br/mongolid-laravel

Easy, powerful and ultrafast MongoDB ODM for Laravel.

23827.8k2](/packages/leroy-merlin-br-mongolid-laravel)

PHPackages © 2026

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