- Setup Symfony
-
install apache (via XAMMP)
-
download framework
-
create folder in XAMMP/htdocs
-
copy framework in this folder
-
create bundle with
$ php app/console generate:bundle bundleName
- Create Database
- create database for users-table
- create users-table (email, password, lastname, firstname etc.)
- create role for database with password
- Setup parameters.yml
- add database_name
- add user_name
- add user_password
- Generate mapping and entities
- mow the application needs some mapping between the bundle and the database
- we are using doctrine (maybe install with composer? Shouldn't be necessary)
-
create mapping:
$ php app/console doctrine:mapping:import bundleName
-
create entities (create the models of the tables in the database)
$ php app/console doctrine:generate:entities bundleName
- Add login-form in special login.html.twig
- add form-tag with method='POST' and action={{ path('route_name_to_login_action') }}
- add input for email (add name-parameter)
- add input for password (add name-parameter)
- add button for submit (add submit-parameter)
- Add login-action to controller
- add Request-Class with use-command
- initialize EntityManager
- initialize Repository (to search in the DB)
- get parameters from Request-Object (email and password)
- add user-validation via DB check