symfony 命令
1.创建Bundle
php bin/console generate:bundle --namespace=Home/IndexBundle --format=yml 创建bundle会更新app文件夹下的 appKernel.php config/routing.yml
2.创建entity
php bin/console doctrine:generate:entity
1>.The Entity shortcut name: HomeIndexBundle:User 添加表明
2>.Configuration format (yml, xml, php, or annotation) [annotation]. 配置文件类型
3>.New field name 添加字段
或者用:
$php bind/console doctrine:generate:entity --entity="HomeIndexBundle:User" --fields="name:string(255) price:float description:text"