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.
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.jenssegers/laravel-mongodb. Evaluating it separately is the right call if you are considering that package, forking it, or pinning it internally.Consider it when:
DB facade API — the learning curve is near zero, which matters for delivery speed and onboarding.jenssegers/laravel-mongodb family and need to understand the layering.Look elsewhere when:
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.ext-mongodb / PHP 8.x / Laravel 10–12 compatibility. Do not assume.mongodb/mongodb driver library directly.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.
How can I help you explore Laravel packages today?