天天看點

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/