php bin/console make:entity

Creates or updates a Doctrine entity class, and optionally an API Platform resource

Usage

make:entity [-a|--api-resource] [-b|--broadcast] [--regenerate] [--overwrite] [--] [<name>]

Arguments

name   Class name of the entity to create or update (e.g. <fg=yellow>TinyPopsicle</>) 

Options

-a,   --api-resource   Mark this class as an API Platform resource (expose a CRUD API for it) 
-b,   --broadcast      Add the ability to broadcast entity updates using Symfony UX Turbo? 
      --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

Symfony can also broadcast all changes made to the entity to the client using Symfony
UX Turbo.

php bin/console make:entity --broadcast

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