jenssegers / mongodb-core
A MongoDB based Query builder for Laravel
Requires
- ext-mongodb: *
- illuminate/database: ^5.6
- mongodb/mongodb: ^1.0
Requires (Dev)
- orchestra/testbench: ^3.7
- php-coveralls/php-coveralls: ^2.0
- phpunit/phpunit: ^6.0|^7.0
Suggests
- jenssegers/mongodb: Add Eloquent support to laravel-mongodb
- jenssegers/mongodb-sentry: Add Sentry support to laravel-mongodb
- jenssegers/mongodb-session: Add MongoDB session support to laravel-mongodb
This package is auto-updated.
Last update: 2024-12-11 00:18:15 UTC
README
The MongoDB Core package that powers laravel-mongodb.
This package provides core functionality to your Laravel application to connect to a Mongo database. It provides a Mongo database connector and a query builder. If you want to have MongoDB support for your Eloquent models, check out laravel-mongodb.
Contributing
This package is still under heavy development. I'm starting a complete rewrite of laravel-mongodb, starting with splitting of the core functionality into a separate package.
Laravel has changed a lot since the original code was written. I have found a much more elegant way of extending the Laravel query builder with MongoDB support using grammars.
I am currently looking for contributors and reviewers to get this package ready for production so that it can be integrated in laravel-mongodb.
How can I contribute?
1. Reviewing
Review code being pushed to this repository, and create issues to discuss if you may have found a better way to solve a certain functionality.
2. Writing Tests
Tests are important to make sure this package remains stable during its course of development. If you want a new feature, or think something is not working like it should, please add a test proving the correct functionality, so that me or others can provide the correct implementation.
3. Pull Requests
Pull requests are more than welcome to speed up the development of the package. Currently, there are quite some methods in src/Query/Grammars/MongoGrammar.php that throw a not yet implemented
exception. I think implementing these are a great easy way to contribute!
4. Documentation
This package provides quite some functionality, and documenting it will be a challenge. Contributions to add and/or improve documentation are certainly welcome!
Installation
Make sure you have the MongoDB PHP driver installed. You can find installation instructions here.
Install the package using composer:
composer require jenssegers/mongodb-core
Testing
The tests can be run inside a Docker container using:
make test