PHP code example of idct / sonata-admin-mongodb-bundle

1. Go to this page and download the library: Download idct/sonata-admin-mongodb-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

idct / sonata-admin-mongodb-bundle example snippets


return [
    // ...
    Sonata\DoctrineMongoDBAdminBundle\SonataDoctrineMongoDBAdminBundle::class => ['all' => true],
];

// config/services.php (Symfony 7+ PHP config)
$services->set(App\Admin\BookAdmin::class)
    ->tag('sonata.admin', [
        'manager_type' => 'doctrine_mongodb',
        'model_class'  => App\Document\Book::class,
        'label'        => 'Book',
    ]);