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"
posted on 2017-09-28 19:42  张扬个性,敢为天下先  阅读(288)  评论(0编辑  收藏  举报