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 Core Laravel Package

jenssegers/mongodb-core

Core library powering Laravel MongoDB integration, providing the connection, query builder, and Eloquent model foundations used by jenssegers/mongodb. It enables MongoDB-backed models and fluent queries in Laravel while keeping shared internals separate for reuse and maintenance.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Datastore selection for new features. If the product needs schema-flexible documents (product catalogs with varied attributes, user-generated content, event/activity feeds, CMS-style content, audit logs), this package lets a Laravel team use MongoDB without leaving the framework's query-builder idioms. It is a concrete enabler for "should this feature live in MongoDB or Postgres?" decisions.
  • Build vs. buy on the data-access layer. Adopting this removes the need to hand-roll a MongoDB connection/grammar/processor layer inside Laravel. That is roughly weeks of engineering and ongoing driver-compatibility work your team does not have to own — but see the caveats below, because "buy" here means "adopt a component," not "adopt a supported product."
  • Incremental migration off SQL. The query builder mirrors Laravel's DB::table(...) API, so legacy read paths can be re-pointed at MongoDB with limited rewrite. This supports a phased migration roadmap rather than a big-bang cutover.
  • Scope control on the ORM question. Because this is the query-builder core only (no Eloquent models, relationships, or hydration), it supports a deliberate decision not to introduce a full ODM. Teams that want repositories over raw collections, or that already have a domain layer, avoid the "two competing models" problem.
  • Architecture choices for read-heavy paths. Direct collection access suits high-volume, low-join reads (feeds, listings, lookups) where ORM overhead and relational joins are the wrong tool.
  • Ecosystem/vendor assessment. This is the substrate beneath jenssegers/laravel-mongodb. Evaluating it separately is the right call if you are considering that package, forking it, or pinning it internally.

When to Consider This Package

Consider it when:

  • You are on Laravel and standardizing on MongoDB, and you specifically want query-builder-level access rather than an ODM.
  • You are building your own repository or model layer on top of MongoDB and want a thin, framework-native foundation instead of writing connection, grammar, and post-processing code.
  • Your team already knows the DB facade API — the learning curve is near zero, which matters for delivery speed and onboarding.
  • You need a low-ceremony path: no model classes, no relationship definitions, no hydration magic — just collections, filters, and projections.
  • You are evaluating or forking the jenssegers/laravel-mongodb family and need to understand the layering.

Look elsewhere when:

  • You want Eloquent. If your product needs models, relationships, casts, or Model::query() ergonomics, use the full jenssegers/laravel-mongodb or the vendor-supported mongodb/laravel-mongodb instead. This package will leave you writing the ORM yourself.
  • Package health is a gating criterion. Zero stars and zero dependents are strong signals this is an internal component of a larger package rather than an independently maintained library. There is no independent release cadence, issue tracker activity, or security-response process you can rely on. Pin it, vendor it, or consume it transitively through the parent package.
  • You need guaranteed feature parity with modern MongoDB. Verify explicitly: aggregation pipeline support, transactions/sessions, Atlas Search, schema validation, bulk writes, and current ext-mongodb / PHP 8.x / Laravel 10–12 compatibility. Do not assume.
  • You are not on Laravel, or you are on a framework-agnostic service — use the official mongodb/mongodb driver library directly.
  • You require commercial support or a vendor SLA. None exists here.
  • Your workload is fundamentally relational (multi-entity joins, strong consistency across aggregates, heavy reporting). Neither this package nor MongoDB is the fix.

How to Pitch It (Stakeholders)

For executives (one paragraph): We can add MongoDB-backed features — flexible product catalogs, activity feeds, content and log data — to our Laravel application without building and maintaining our own database integration layer. This package is the query-builder component of a widely used open-source MongoDB-for-Laravel family; adopting it saves us an estimated multi-week build and lets us move faster on document-oriented features while keeping the rest of the stack unchanged. The trade-off to flag: it is a component, not a supported product — it has no independent community or release process, so we should pin the version, track it as an internal dependency, and budget modest effort for upgrades and compatibility testing. Risk is manageable and contained to the data-access layer; the alternative — writing our own — carries more risk, not less.

For engineering (summary): It is the connection + query builder + grammar + processor slice of jenssegers/laravel-mongodb, exposing Laravel's DB::table()-style API over MongoDB collections. No Eloquent, no hydration — which is the point if we want repositories over raw collections. Adopt it pinned to a known-good version, treat it as vendored code, and validate before committing: PHP/Laravel/ext-mongodb compatibility matrix, aggregation pipeline and transaction support, bulk operations, and test coverage. If we later want models and relationships, we graduate to the full jenssegers/laravel-mongodb or the official mongodb/laravel-mongodb — the API surface is compatible enough that this is not a one-way door.

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.
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator