Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mongodb Laravel Package

broutard/mongodb

A Laravel/PHP package that brings MongoDB into your applications, offering query building, model integration, and document handling so you can work with MongoDB collections using familiar Laravel-style syntax.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Data model fit (document vs. relational): Forces an explicit decision on whether the domain is genuinely document-shaped — heterogeneous product catalogs, CMS/content trees, user-generated payloads, embedded address/history arrays — where a fixed schema would mean constant migrations. This package lets you validate that bet without leaving Eloquent.
  • Time-to-market on schema-fluid features: When roadmap items are "new content type," "new attribute on listings," or "customer-specific custom fields," an Eloquent-compatible Mongo layer removes a migration cycle per change. That's a schedule decision, not just a technical one.
  • Build vs. buy for the data-access layer: The alternative is hand-rolled raw MongoDB queries sprinkled through services. Adopting an ODM-style package is the cheaper path — but the specific fork matters (see below).
  • Scope of an MVP or internal tool: Low-ceremony persistence for prototypes, admin back offices, event/activity logs, and audit trails where you want to ship in weeks and defer schema governance.
  • Polyglot persistence roadmap: If the architecture is heading toward "Postgres for transactional core + Mongo for content/telemetry," this is the concrete integration that makes that split cheap in a Laravel codebase.
  • Migration/exit-cost analysis: Because it mirrors Eloquent's model and query-builder API, the switching cost between relational and document stores is lower — useful when underwriting the reversibility of an architectural bet.

Important qualifier for the decision record: this specific package (broutard/mongodb) has 0 stars and 0 dependents — it is a low-signal fork of the long-established Moloquent lineage. The capability is worth evaluating; this distribution is not the one to standardize on. The maintained option is MongoDB's official mongodb/laravel-mongodb. Treat this repo as a reference implementation, not a dependency.

When to Consider This Package

Adopt the pattern when:

  • Your data is genuinely document-shaped: nested/embedded structures, per-record variable attributes, or read-mostly aggregates fetched as a unit.
  • Schema churn is a bottleneck — you're shipping migrations weekly for additive field changes.
  • The team is Laravel-native and you want one mental model (Eloquent models, relationships, casts, query builder) across both stores.
  • Workloads are write-heavy append patterns (logs, events, telemetry) or geo/aggregation-pipeline reads that SQL makes awkward.
  • You need horizontal scaling or a managed document store for operational reasons already decided upstream.

Look elsewhere when:

  • You need this in production — use mongodb/laravel-mongodb instead. Zero stars, zero dependents, and a single-fork maintenance model mean no security-patch cadence, no community triage, no upgrade guarantees across Laravel majors. That is a vendor-risk decision, not a code-quality one.
  • Your domain is join-heavy or integrity-critical: multi-entity relational constraints, reporting/BI on SQL, finance/ledger workloads, or anything needing mature multi-document transactional guarantees across many collections.
  • Your team's operational muscle is relational — backups, PITR, query tuning, and on-call runbooks for Mongo are a real cost center.
  • You need first-class support contracts, or your compliance posture requires a maintained, auditable dependency with a CVE process.
  • You're on a Laravel version this fork hasn't tracked — verify compatibility before anything else.

How to Pitch It (Stakeholders)

For executives: "There's a well-established pattern for letting our Laravel app talk to MongoDB using the same model code we already write. It buys us speed on schema-fluid features — new content types and customer-specific fields without a database migration each time — and it keeps the door open to scale reads horizontally. Two caveats worth your attention: we should adopt the officially maintained MongoDB package rather than the specific fork on the table, which has no adoption or support base; and this is the right call only if our data is genuinely document-shaped rather than relational. My recommendation is a scoped spike, not a platform standard."

For engineering: "This is the Moloquent-style Eloquent adapter for MongoDB — models, relationships, casts, and a query builder over the document store, so there's no second mental model for the team. It supports embedded documents, aggregation pipeline, and geo queries, which is where it beats forcing this into SQL. Before you invest: confirm Laravel-version compatibility, diff it against mongodb/laravel-mongodb (the maintained upstream), and check the maintenance signal — this fork has no stars, no dependents, and no visible release cadence. Prototype on a non-critical bounded context — an activity log or a content catalog — and measure operational overhead (indexing, backup/restore, local dev parity) before we consider it for anything transactional."

Bottom line: Strong capability fit, weak distribution. Evaluate the pattern; standardize on the maintained upstream; gate adoption behind a two-to-four week spike on a low-blast-radius workload.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox