Weave Code
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
Doctrine Mongodb Admin Bundle

Doctrine Mongodb Admin Bundle Laravel Package

sonata-project/doctrine-mongodb-admin-bundle

Symfony bundle that integrates Doctrine MongoDB ODM with SonataAdminBundle, providing admin services, mappers, and datagrid support to manage MongoDB documents via Sonata’s admin UI. Includes docs, CI, and versioned releases.

View on GitHub
Deep Wiki
Context7

Symfony Sonata / Integrate Doctrine MongoDB ODM into the SonataAdminBundle

Frequently asked questions about Doctrine Mongodb Admin Bundle
Can I use SonataDoctrineMongoDBAdminBundle directly in Laravel without Symfony?
No, this bundle is Symfony-centric and relies on Symfony’s Dependency Injection, EventDispatcher, and Twig. However, you can integrate its core logic (datagrid, form handling, and admin services) into Laravel by wrapping Sonata components in custom service providers and using Symfony bridge packages like `symfony/dependency-injection`.
What Laravel MongoDB packages does this bundle work with (e.g., jenssegers/mongodb, spatie/laravel-mongodb)?
This bundle assumes **Doctrine MongoDB ODM**, not Laravel’s native MongoDB drivers. If using `jenssegers/mongodb` or `spatie/laravel-mongodb`, you’d need a custom `ModelManager` to translate Doctrine ODM queries to Laravel’s MongoDB queries, adding complexity. Consider whether Sonata’s features justify this effort.
How do I handle authentication/authorization in Laravel if Sonata uses Symfony’s security system?
Sonata’s security integration won’t work natively in Laravel. You’d need to map Symfony’s security roles to Laravel’s **Gate/Policy** system or use middleware to bridge the two. For example, create a custom guard or override Sonata’s access control logic in your Laravel service provider.
Is this bundle compatible with Laravel 10+? What Symfony version does it require?
This bundle targets **Symfony 5.4+** (as of its last release in 2025). While Laravel 10+ can technically use Symfony components via bridges, full compatibility isn’t guaranteed. Test thoroughly, especially with Symfony’s `EventDispatcher` and `DependencyInjection`, which may need Laravel-specific overrides.
What’s the easiest way to integrate Sonata’s admin UI into Laravel’s Blade templates?
Replace Sonata’s Twig templates with Blade by extracting its logic (e.g., datagrid rendering, form handling) into reusable PHP classes. Use packages like `blade-twig` for hybrid rendering or manually port Twig logic to Blade. Avoid direct template inheritance due to Symfony’s tight coupling with Twig.
Are there performance concerns using Sonata’s admin layer with MongoDB in Laravel?
Yes, Sonata’s datagrid, filters, and batch actions add overhead. MongoDB’s flexible schema can also impact query performance if not optimized. Mitigate this by lazy-loading components, indexing MongoDB collections properly, and avoiding complex nested queries in the admin interface.
What alternatives exist for MongoDB admin panels in Laravel that don’t require Symfony?
Consider **Filament**, **Nova**, or **Backpack for Laravel**, which offer native Laravel admin panels with MongoDB support via `jenssegers/mongodb`. For lightweight needs, build a custom admin panel using Laravel’s **Resource Controllers** or **Livewire**. These avoid Symfony’s dependency bloat.
How do I configure this bundle for a hybrid Eloquent + MongoDB Laravel project?
Use Sonata’s admin services **only for MongoDB models**, while keeping Eloquent models in Laravel’s native admin layer. Register Sonata’s services in a Laravel provider, but ensure route conflicts are resolved by overriding Sonata’s router or using Laravel’s route model binding to map to custom controllers.
Is this bundle actively maintained? Should I fork it for Laravel support?
The bundle’s last release was in **December 2025**, and Sonata Project is no longer actively maintained. If you proceed, expect to fork and maintain it. Alternatively, extract the logic you need (e.g., datagrid, form handling) and rebuild it as a Laravel-native package.
Can I use Sonata’s batch actions (e.g., bulk delete, export) in Laravel with this bundle?
Yes, but you’ll need to adapt Sonata’s batch action logic to Laravel’s **Event system** or **Queues**. The core functionality (e.g., datagrid actions) can be reused, but Symfony’s event listeners would require Laravel-specific implementations. Test thoroughly for edge cases like middleware or CSRF protection.
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.
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony
spatie/flare-daemon-runtime