September 18, 2024
Symfony loyiha yaratish
composer create-project symfony/skeleton projectName
open terminal phpstorm and run the command "composer req api"
This installs all required programms and other tools.
press CTRL + ALT + S and open Settings and click
Editors -> File and Code Templates -> PHP Class
Then Code Styles -> PHP -> Set from -> PSR 12
run the command composer require --dev symfony/maker-bundle
copy .env folder as .env.local
Connecting DB
In .env.local folder comment PostgreSQL url and modify DATABASE_URL link to mysql://root@localhost:3306/dbName
then run the command bin/console doctrine:database:create
then database section correct the connection
Creating entity
bin/console make:entity
add entity name and other properties
bin/console make:migration
bin/console doctrine:migrations:migrate