登录 注册

laravel-mongodb

去点 Star
AI 模型与开发框架
7,060
Stars
0
Forks
0
Watchers
0
Open Issues
未知
许可证
PHP
语言
创建时间
最近更新

项目能做什么

基于 MongoDB 的 Laravel Eloquent 模型与查询构建器。
来源:AI 基于仓库事实生成 · 内容以仓库实际 README 为准

使用说明 查看原始 README 原仓库文档

中文使用说明暂未生成。下面保留原仓库 README 摘录,命令与配置均以原文为准。
原始 README 摘录(英文原文,节选前 3000 字符)
Laravel MongoDB
===============

[![Latest Stable Version](http://img.shields.io/github/release/mongodb/laravel-mongodb.svg)](https://packagist.org/packages/mongodb/laravel-mongodb)
[![Total Downloads](http://img.shields.io/packagist/dm/mongodb/laravel-mongodb.svg)](https://packagist.org/packages/mongodb/laravel-mongodb)
[![Build Status](https://img.shields.io/github/actions/workflow/status/mongodb/laravel-mongodb/build-ci.yml)](https://github.com/mongodb/laravel-mongodb/actions/workflows/build-ci.yml)

This package adds functionalities to the Eloquent model and Query builder for MongoDB, using the original Laravel API.
*This library extends the original Laravel classes, so it uses exactly the same methods.*

This package was renamed to `mongodb/laravel-mongodb` because of a transfer of ownership to MongoDB, Inc.
It is compatible with Laravel 10.x. For older versions of Laravel, please refer to the
[old versions](https://github.com/mongodb/laravel-mongodb/tree/3.9#laravel-version-compatibility).

## Documentation

- https://www.mongodb.com/docs/drivers/php/laravel-mongodb/
- https://www.mongodb.com/docs/drivers/php/ 

## Release Integrity

Releases are created automatically and the resulting release tag is signed using
the [PHP team's GPG key](https://pgp.mongodb.com/php-driver.asc). To verify the
tag signature, download the key and import it using `gpg`:

```shell
gpg --import php-driver.asc
```

Then, in a local clone, verify the signature of a given tag (e.g. `4.4.0`):

```shell
git show --show-signature 4.4.0
```

> [!NOTE]
> Composer does not support verifying signatures as part of its installation
> process.

## Reporting Issues

Think you’ve found a bug in the library? Want to see a new feature? Please open a case in our issue management tool, JIRA:

- [Create an account and login.](https://jira.mongodb.org/)
- Navigate to the [PHPLARA](https://jira.mongodb.org/browse/PHPLARA) project.
- Click Create - Please provide as much information as possible about the issue type and how to reproduce it.

Note: All reported issues in JIRA project are public.

For general questions and support requests, please use one of MongoDB's
[Technical Support](https://mongodb.com/docs/manual/support/) channels.

### Security Vulnerabilities

If you've identified a security vulnerability in a driver or any other MongoDB
project, please report it according to the instructions in
[Create a Vulnerability Report](https://mongodb.com/docs/manual/tutorial/create-a-vulnerability-report).

## Development

Development is tracked in the
[PHPLARA](https://jira.mongodb.org/projects/PHPLARA/summary) project in MongoDB's
JIRA. Documentation for contributing to this project may be found in
[CONTRIBUTING.md](CONTRIBUTING.md).
阅读完整原文

商业机会分析 AI 生成

Laravel + MongoDB 多租户 SaaS 快速开发脚手架

产品构想构建一套预置集成 mongodb/laravel-mongodb 的高质量商业脚手架,解决 MongoDB 在 Laravel 下多租户数据隔离、租户动态切库/切集合的工程难题。
核心功能租户级数据库/集合自动隔离中间件、基于 MongoDB 的权限与认证体系(RBAC)、Stripe/Paddle 计费集成、针对非关系型文档优化的审计日志。
目标用户计划构建文档密集型或事件型 SaaS(如表单系统、日志管理、内容平台)的独立开发者与初创团队。
难度/周期中等 · 1-2 个月 · 成本:极低(主要是本地开发与基础演示云服务器成本)
收费模式数字商品单次购买授权(Lifetime License)+ 持续更新支持包年订阅。
竞争风险Laravel 生态中以 MySQL/PostgreSQL 为基础的模板占据绝对主流,针对 MongoDB 的利基市场规模较小(推测)。
依据 AI推测

Laravel-Mongo 慢查询与聚合管道可视化分析扩展包

产品构想针对 Laravel + MongoDB 场景开发深度性能分析工具,类似 Telescope 但专注分析 Mongo 独有的 Aggregation 管道性能、索引缺失告警与反模式检查。
核心功能Eloquent 查询对应的 MongoDB 原始查询翻译与耗时监控、索引命中率检测与创建建议、慢聚合管道步骤拆解分析、低效全表扫描告警。
目标用户在生产环境中遇到 MongoDB 查询延迟、内存溢出或未命中复合索引痛点的研发人员与运维。
难度/周期中等 · 1-3 个月 · 成本:低(开发环境构建与测试各类驱动版本)
收费模式核心开源 + Pro 版高级报表与持续监控功能付费授权。
竞争风险通用 APM(如 Datadog、Sentry)可能分流监控需求,需在 Laravel 专属深度集成上体现差异(推测)。
依据 尚需验证的假设

Eloquent SQL 转 MongoDB 迁移与同步工具箱

产品构想提供 CLI 工具与适配层,协助已有传统关系型 Laravel 系统无缝将指定表结构迁移/同步重构为 MongoDB 嵌套文档结构。
核心功能外键关联关系自动重构为内嵌文档或引用文档映射器、全量与增量平滑迁移 CLI、双写验证与回滚脚本生成器。
目标用户经历数据量激增需将历史数据归档至 Mongo,或因业务变更将 MySQL 迁移至 MongoDB 的技术团队。
难度/周期高 · 2-4 个月 · 成本:低(主要是跨版本兼容测试成本)
收费模式商业 CLI 授权售卖 + 专家数据迁移咨询服务。
竞争风险数据库架构重构频次低,属于偶发性强需求,获客成本高且对数据安全容错率极低(推测)。
依据 AI推测
AI 基于仓库公开数据分析生成,含推测成分,不构成收益承诺。
报告会保存到 个人中心

竞品与相似项目 GitHub Search 真实检索

项目中文简介Stars语言
spatie/laravel-medialibrary 中文介绍暂未生成
Associate files with Eloquent models
6,175 PHP
braziljs/eloquente-javascript 中文介绍暂未生成
Tradução do livro "Eloquent JavaScript" 4ª edição, por Marij
5,522 JavaScript
corcel/corcel 中文介绍暂未生成
Use WordPress backend with Laravel or any PHP application
4,773 PHP
spatie/laravel-query-builder 中文介绍暂未生成
Easily build Eloquent queries from API requests
4,470 PHP
cviebrock/eloquent-sluggable 中文介绍暂未生成
Easy creation of slugs for your Eloquent models in Laravel
3,996 PHP
JosephSilber/bouncer 中文介绍暂未生成
Laravel Eloquent roles and abilities.
3,577 PHP
以上为通过 GitHub 官方 Search API 检索的相似项目,功能差异与优劣势需进一步人工确认,配置 AI 后可生成对比分析。

项目优势与风险

技术成熟度创建于 ,最近推送 ,发布过 100 个 Release
社区活跃Star 7,060 / Fork 0 / Issue 0(数据支持,可自行核实)
许可证未检测到(需人工确认)
主要风险上游项目方向可能变化;同赛道竞争者较多(见竞品表);热度与需求不完全等价

安装与使用

快速开始(以仓库 README 为准)
git clone https://github.com/mongodb/laravel-mongodb.git
cd laravel-mongodb
# 请阅读仓库 README 获取确切安装步骤(依赖、配置、启动命令)
阅读原仓库文档
术语说明:Docker=应用容器(把程序和依赖打包运行);API Key=调用外部服务的密钥;Git Clone=把仓库代码下载到本地。常见错误:API Key 未配置 / 端口占用 / 数据库连接失败,多数项目在 README 的 Troubleshooting 章节有说明。