Skip to content

Instantly share code, notes, and snippets.

@Manapyzz
Last active June 11, 2021 14:58
Show Gist options
  • Save Manapyzz/15561e218869b4b3ace4aeacacc6a29f to your computer and use it in GitHub Desktop.
Save Manapyzz/15561e218869b4b3ace4aeacacc6a29f to your computer and use it in GitHub Desktop.

Create a project

symfony new project-name

Start your SF app

symfony server:start (-d to lauch as daemon)

Stop your SF app

symfony server:stop

Generating Code

You need this:

composer require symfony/maker-bundle --dev

composer require doctrine/annotations

composer require orm

Create a page

bin/console make:controller

Create an entity

bin/console make:entity

Create database

Setup .env file

bin/console doctrine:database:create -> create database

bin/console make:migration -> create a migration

bin/console doctrine:migrations:migrate -> push migration to database

Auth

You need this:

composer require security

composer require twig

composer require form validator

Create User

bin/console make:user

Create Login

bin/console make:auth

Create Registration Form

bin/console make:registration-form

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment