PHPackages                             nligo/mongodb - 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. nligo/mongodb

ActiveLibrary

nligo/mongodb
=============

hyperf mongodb扩展包

v1.1.0(5y ago)013MITPHPPHP &gt;=7.2

Since Dec 10Pushed 5y ago2 watchersCompare

[ Source](https://github.com/nlitt/hyperf-mongodb)[ Packagist](https://packagist.org/packages/nligo/mongodb)[ RSS](/packages/nligo-mongodb/feed)WikiDiscussions master Synced 1w ago

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

hyperf-mongodb
==============

[](#hyperf-mongodb)

功能
--

[](#功能)

- 配置mongodb.
- mongodb集合操作.

安装 ([Composer](https://getcomposer.org))
----------------------------------------

[](#安装-composer)

```
composer require nligo/mongodb dev-master
```

推送配置文件
------

[](#推送配置文件)

```
php bin/hyperf.php mongodb:publish --config

```

如何使用
----

[](#如何使用)

\###Document

```
namespace App\Document;

use  Nlitt\Mongodb\MongoDb;

class User extends MongoDb
{
    /**
     * mongodb表
     *
     * @var null
     */
    public $collectionName = 'user';
}
```

\###Controller

```
namespace App\Controller;

use App\Document\User;

class UserController extends AbstractController
{
    protected $user;
    public function __construct(User $user)
    {
        $this->user = $user;
    }

    public function index()
    {
        return $this->user->findOne();
    }
}
```

\###Response

```
{
    "_id": "5fd185e8cfee47454d71d032",
    "name": "nlitt"
}
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

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

1985d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25634187?v=4)[nligo](/maintainers/nligo)[@nligo](https://github.com/nligo)

---

Top Contributors

[![gf9527](https://avatars.githubusercontent.com/u/16248876?v=4)](https://github.com/gf9527 "gf9527 (8 commits)")

---

Tags

phphyperf

### Embed Badge

![Health badge](/badges/nligo-mongodb/health.svg)

```
[![Health](https://phpackages.com/badges/nligo-mongodb/health.svg)](https://phpackages.com/packages/nligo-mongodb)
```

###  Alternatives

[limingxinleo/hyperf-utils

Utils for Hyperf.

29133.9k3](/packages/limingxinleo-hyperf-utils)

PHPackages © 2026

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