PHPackages                             saguajardo/rest\_lumen\_mongodb\_redis - 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. saguajardo/rest\_lumen\_mongodb\_redis

ActiveProject

saguajardo/rest\_lumen\_mongodb\_redis
======================================

This project consists of the generation of an API Rest with Lumen, using mongoDB as a database. The list of stored records is cached with Redis

172PHP

Since Jul 31Pushed 7y ago1 watchersCompare

[ Source](https://github.com/saguajardo/rest_lumen_mongodb_redis)[ Packagist](https://packagist.org/packages/saguajardo/rest_lumen_mongodb_redis)[ RSS](/packages/saguajardo-rest-lumen-mongodb-redis/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Api Rest using Lumen, MongoDB and Redis
=======================================

[](#api-rest-using-lumen-mongodb-and-redis)

This project consists of the generation of an API Rest with Lumen, using mongoDB as a database. The list of stored records is cached with Redis.

Table of contents
-----------------

[](#table-of-contents)

- [Requirements](#requirements)
- [Installation](#installation)
- [Configuration](#configuration)
- [Examples](#examples)

Requirements
------------

[](#requirements)

This project was developed using php v7.2 in Windows 8, with xampp server.

***MongoDB PHP Driver***: Make sure you have the MongoDB PHP driver installed. You can find installation instructions at

You can find the mongoDB dll for php v7.2 in the directory src/dependencies/mongodb\_dll.

Then you must enable the extension in the "Dynamic extensions" section of the php.ini file

```
extension=php_mongodb.dll

```

**WARNING**: The old mongo PHP driver is not supported anymore in versions &gt;= 3.0.

***Installing MongoDB***: Below is the link to the documentation on how to install Mongo DB

***Installing Redis***:

The file redis-2.4.5-win32-win64.zip is located in the src/dependencies directory. The content of the zip should be extracted in the directory C:\\redis. Finally, execute the file redis-server.exe of the corresponding version (32bits or 64bits).

***INFO***: For the execution of the project, I use the Chrome Advance REST Client extension

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

[](#installation)

The repository should be cloned in the directory C:\\xampp\\htdocs\\ (the directory will depend on the installed php server, in my case corresponds to xampp).

```
git clone https://github.com/saguajardo/rest_lumen_mongodb_redis.git rest

```

This will create the rest\\ directory in C:\\xampp\\htdocs\\

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

[](#configuration)

Rename the ".env.example" file located in src/project/ directory by ".env". In this file you can find the connection settings to mongoDB

```
DB_CONNECTION=mongodb
DB_HOST=localhost
DB_PORT=27017
DB_DATABASE=db_mongodb
DB_USERNAME=username_mongodb
DB_PASSWORD=123456

```

***INFO***: These credentials are obtained from the installation of mongoDB

***Create Collection DB***: To create the collection in mongoDB, you must execute the following command artisan in the directory C:\\xampp\\htdocs\\redis\\project\\ from the command prompt (cmd).

```
php artisan migrate
php artisan db:seed

```

Examples
--------

[](#examples)

Once the installation steps are complete, the Chrome Advance Rest Client extension must be run.

***Available methods***: The available methods of the api are the following:

MethodURLParametersGET{}POST{id, due\_date, completed, date\_creation, date\_update, next}POST{due\_date, title, description, completed}PUT{id, due\_date, title, description, completed}DELETE{id}The parameters must be sent in JSON format, as shown below:

```
{
 "id": "5b5a387e1b5a72056c0078b3",
 "due_date": "2018-07-30",
 "completed": true,
 "date_complete": "2018-07-30",
 "date_update": "2018-07-30"
}

```

***Aditional***: You can verify the installation in the following video, along with the tests carried out on the creation and use of mongoDB and Redis

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/6fec1338a63d5ac6465b349438c9cd83b1894493ec441f7f50550415e0d84b69?d=identicon)[sguajardo](/maintainers/sguajardo)

---

Top Contributors

[![TattooX](https://avatars.githubusercontent.com/u/11413869?v=4)](https://github.com/TattooX "TattooX (8 commits)")[![saguajardo](https://avatars.githubusercontent.com/u/18266295?v=4)](https://github.com/saguajardo "saguajardo (1 commits)")

### Embed Badge

![Health badge](/badges/saguajardo-rest-lumen-mongodb-redis/health.svg)

```
[![Health](https://phpackages.com/badges/saguajardo-rest-lumen-mongodb-redis/health.svg)](https://phpackages.com/packages/saguajardo-rest-lumen-mongodb-redis)
```

PHPackages © 2026

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