# Symfony 4 tutorial ## Creating the project Project has been created with symfony new project template ``` composer create-project symfony/website-skeleton demo ``` ## init repo and commit ``` cd demo git init && git add . && git commit -am 'initial commit' ``` ## Installing the better server [more info](https://symfony.com/doc/current/setup/web_server_configuration.html) ``` composer require server --dev ``` ## Configure database First create an empty database ``` sqlite3 var/data.db "SELECT 1;" ``` Modify your DATABASE_URL config in .env replace `DATABASE_URL` with ``` DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db" ``` Also change the driver in ``` config/packages/doctrine.yaml ``` to `pdo_sqlite` see commit 309501007ae9f2b114893e3aee7228e461d2699b ## installing [makeBundle command](https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html) ``` composer require symfony/maker-bundle --dev ``` ## How to Add and Entity and Table ``` bin/console make:entity bin/console make:migration php bin/console doctrine:migrations:migrate ```