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

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

dedemao/mongodb
===============

A simple mongoDB library for PHP7

1.0.2(6y ago)441MITPHPPHP &gt;=7.0

Since May 16Pushed 6y agoCompare

[ Source](https://github.com/dedemao/mongoDBHelper)[ Packagist](https://packagist.org/packages/dedemao/mongodb)[ RSS](/packages/dedemao-mongodb/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)DependenciesVersions (4)Used By (0)

mongoDBHelper
=============

[](#mongodbhelper)

A simple mongoDB library for PHP7

Installation
============

[](#installation)

The preferred method of installing this library is with Composer by running the following from your project root:

```
$ composer require dedemao/mongodb

```

How to use
==========

[](#how-to-use)

Demo 1：

```
require 'vendor/autoload.php';

$conf['host'] = '127.0.0.1';
$conf['port'] = '27017';
$conf['user'] = '';
$conf['pass'] = '';
$conf['dbname'] = 'test';
$conf['collectionname'] = 'demo';
$mongo = new dedemao\mongodb\MongoDBHelper($conf);

```

Demo 2：

```
include "src/mongoDBHelper.php";

$conf['host'] = '127.0.0.1';
$conf['port'] = '27017';
$conf['user'] = '';
$conf['pass'] = '';
$conf['dbname'] = 'test';
$conf['collectionname'] = 'demo';
$mongo = new dedemao\mongodb\MongoDBHelper($conf);

```

CURD:

```
//Creat：
$result = $mongo->insertOne(['name'=>'John','age'=>'18']);
$result = $mongo->insertMany([['name'=>'John','age'=>'18'],['name'=>'Jay','age'=>'20']]);

//Read：
$row = $mongo->find(['age'=>'18']);
$row = $mongo->findOne(['name'=>'John']);

//Update：
$result = $mongo->update(['name'=>'John'],['$set' => ['age' => '30']]);

//Delete
$result = $mongo->delete(['name'=>'John']);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

2190d ago

### Community

Maintainers

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

---

Top Contributors

[![dedemao](https://avatars.githubusercontent.com/u/9908615?v=4)](https://github.com/dedemao "dedemao (12 commits)")

### Embed Badge

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

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

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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