Application design
The best way to get started is to let Symfony create an application for you, and then modify it according to your needs. This avoids developing code from scratch—and since you have working code, you will learn the ways of Symfony even faster.
TR FUHDWH Dn DSSOLFDWLRn, fiUVW FUHDWH D SyPIRny SURMHFW, set up a database for the application (and don’t forget WR FRnfiJuUH ‘ databases.yml’ fiUVW). OnFH WhH dDWDEDVH is created, you have to run the ‘ symfony doctrine:buildschema’ command, which reads the database you have created, and builds a ‘ schema.yml’ fiOH IRU LW. DuH WR abstraction via OoM and the database abstraction layer, ‘ schema.yml’ lets Symfony know about the database tables Dnd fiHOdV. (YRu FDn DOVR JR WhH RWhHU URuWH—FUHDWH WhH VFhHPD fiOH, Dnd uVH LW WR JHnHUDWH WhH dDWDEDVH.)
kow that the schema file is ready, we can proceed to create the application. gust run the ‘ symfony doctrine:build-model’ command to generate the model ILOHV FRUUHVSRndLnJ WR HDFh WDEOH Ln WhH dDWDEDVH. AIWHU models, the forms have to be created, so run ‘ symfony doctrine:build-forms’. kext, create a module with ‘ symfony doctrine:generDte-module’. Finally, update the ‘ routing. yml’ file by adding a UoL and the corresponding resource name in the file. This completes the process.
kow you can access the application via a Web browser, but dRn’W IRUJHW WR VWDUW yRuU :HE VHUYHU Dnd SODFH WhH fiOHV Ln WhH URRW folder before trying to access them. (For more details on the Web VHUYHU FRnfiJuUDWLRn, UHIHU WR WhH SUHYLRuV DUWLFOH Ln WhLV VHULHV.)