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"

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-08-17
  • 2021-12-04
  • 2022-12-23
  • 2022-12-23
  • 2022-01-01
  • 2021-08-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-25
  • 2021-09-01
  • 2021-08-09
  • 2021-10-20
相关资源
相似解决方案