Symfony Entity Creation

Create an Entity:

(an auto-generated ‘id’ column will be added for you)

php bin/console make:entity

Make sure the namespace path matches the file path:

namespace App\Controller\Utility; // file is at /src/Controller/Utility

Make sure ORM Mapping is in use:

use Doctrine\ORM\Mapping as ORM;

Create a Migration:

php bin/console make:migration

Execute the Migration:

php bin/console doctrine:migrations:migrate