muhammedkamel/lumen-doctrine-mongodb-odm 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

muhammedkamel/lumen-doctrine-mongodb-odm

最新稳定版本:1.6.4

Composer 安装命令:

composer require muhammedkamel/lumen-doctrine-mongodb-odm

包简介

Doctrine MongoDB ODM module for the Lumen PHP framework.

README 文档

README

Doctrine MongoDB ODM module for the Lumen PHP framework Forked from (https://packagist.org/packages/nordsoftware/lumen-doctrine-mongodb-odm) package.

Requirements

  • PHP >= 7.2

Usage

Install through Composer

Run the following command to install the package:

composer require muhammedkamel/lumen-doctrine-mongodb-odm

Register the Service Provider

Add the following line to bootstrap/app.php:

$app->register('MuhammedKamel\Lumen\Doctrine\ODM\MongoDB\DoctrineServiceProvider');

You can now use the DocumentManager facade where needed.

Configure

Create config/odm.php into config and modify according to your needs. Check base class under src/Config/Config.php

Example of config/mongodb.php

<?php return [ 'mapping' => 'xml', 'paths' => [ base_path('some/Domain/Path/To/Your/Infrastructure/Resources/ODM'), base_path('some/App'), ], 'proxy' => [ 'directory' => storage_path('doctrine/proxies'), ], 'hydrator' => [ 'directory' => storage_path('doctrine/proxies'), ], ];

Create config/mongodb.php into config and modify according to your needs.

Example of config/mongodb.php

<?php return [ 'default' => env('MONGODB_DB_CONNECTION', 'mongodb'), 'connections' => [ env('MONGODB_DB_CONNECTION', 'mongodb') => [ 'host' => env('MONGODB_DB_HOST', 'localhost'), 'database' => env('MONGODB_DB_DATABASE', 'forge'), 'username' => env('MONGODB_DB_USERNAME', 'forge'), 'password' => env('MONGODB_DB_PASSWORD', ''), 'timezone' => env('MONGODB_DB_TIMEZONE', '+00:00'), ] ], ];

Run Artisan

Run php artisan and you should see the new commands in the odm:* namespace section.

Contributing

Please note the following guidelines before submitting pull requests:

License

See LICENSE.

统计信息

  • 总下载量: 7.97k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 9
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固