PHP code example of matrix98 / laravel_doctrine_odm
1. Go to this page and download the library: Download matrix98/laravel_doctrine_odm 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/ */
matrix98 / laravel_doctrine_odm example snippets
use LaravelDoctrineODM\Facades\DocumentManager;
$sm = DocumentManager::getSchemaManager();
sh
php artisan vendor:publish --provider=LaravelDoctrineODM\ServiceProviders\IdeHelperServiceProvider
php
use Doctrine\ODM\MongoDB\DocumentManager;
class TestRepository {
protected DocumentManager $dm;
public function __construct(DocumentManager $dm)
{
$this->dm = $dm;
}
}