天天看点

symfony4的使用

1.经常用到的几个命令

       启动:       php bin/console server:run 

      查看所有命令:php bin/console list

      生成数据库:php bin/console doctrine:database:create

      生成entity:    php bin/console make:entity

      生成数据库迁移文件:php bin/console make:migration

      同步到数据库:php bin/console doctrine:migrations:migrate

      手动修改entity后更新entity及生成存储库:php bin/console make:entity --regenerate --overwrite

    根据entity一键生成controller及表单:php bin/console make:crud

2.doctrine的使用

doctrine文档地址:  https://www.doctrine-project.org/projects/doctrine-orm/en/latest/