php bin/console make:entity
Creates or updates a Doctrine entity class, and optionally an API Platform resource
Usage
make:entity [-a|--api-resource] [--regenerate] [--overwrite] [--] [<name>]
Arguments
name Class name of the entity to create or update (e.g. <fg=yellow>FierceChef</>)
Options
-a, --api-resource Mark this class as an API Platform resource (expose a CRUD API for it)
--regenerate Instead of adding new fields, simply generate the methods (e.g. getter/setter) for existing fields
--overwrite Overwrite any existing getter/setter methods
Help
The make:entity command creates or updates an entity and repository class.
php bin/console make:entity BlogPost
If the argument is missing, the command will ask for the entity class name interactively.
You can also mark this class as an API Platform resource. A hypermedia CRUD API will
automatically be available for this entity class:
php bin/console make:entity --api-resource
You can also generate all the getter/setter/adder/remover methods
for the properties of existing entities:
php bin/console make:entity --regenerate
You can also *overwrite* any existing methods:
php bin/console make:entity --regenerate --overwrite