The ODM Document Maker helps you create Symfony Doctrine ODM Documents
composer require constantable/odm-document-maker
The constantable:make-document
command creates or updates a document and repository class.
php bin/console constantable:make-document BlogPost
If the argument is missing, the command will ask for the document class name interactively.
You can also mark this class as an API Platform resource. A hypermedia CRUD API will automatically be available for this document class:
php bin/console constantable:make-document --api-resource
You can also generate all the getter/setter/adder/remover methods for the properties of existing documents:
php bin/console constantable:make-document --regenerate
To overwrite any existing methods:
php bin/console constantable:make-document --regenerate --overwrite
You can create an EmbeddedDocument class:
php bin/console constantable:make-document --embedded