updated documentation, got login working
This commit is contained in:
		
							parent
							
								
									5e72e23051
								
							
						
					
					
						commit
						cb15ef2534
					
				@ -2,7 +2,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
## Requirements
 | 
					## Requirements
 | 
				
			||||||
 | 
					
 | 
				
			||||||
* ubuntu php-cli (sudo nala install curl unzip php-curl php-xml php-mysql)
 | 
					* ubuntu (sudo nala install curl unzip php-curl php-xml php-cli php-mysql)
 | 
				
			||||||
* [Install Composer](https://www.nickyeoman.com/page/install-composer-on-ubuntu) 
 | 
					* [Install Composer](https://www.nickyeoman.com/page/install-composer-on-ubuntu) 
 | 
				
			||||||
* [Symfony cli](https://symfony.com/download)
 | 
					* [Symfony cli](https://symfony.com/download)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -21,8 +21,10 @@ cd YOUR_PROJECT_NAME
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
The next steps to take would be:
 | 
					The next steps to take would be:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
1. Verify the ```.env``` and ```docker-compose.md``` file
 | 
					1. Verify the ```.env``` and ```docker-compose.yml``` file
 | 
				
			||||||
 | 
					  1. Set mailhog: MAILER_DSN=smtp://symfony-mailhog:1025
 | 
				
			||||||
1. start docker ```sudo docker-compose up -d```
 | 
					1. start docker ```sudo docker-compose up -d```
 | 
				
			||||||
 | 
					1. test at http://localhost:8000
 | 
				
			||||||
1. [Create your controllers](https://git.nickyeoman.com/nick/symfony/src/branch/main/docs/Controller.md)
 | 
					1. [Create your controllers](https://git.nickyeoman.com/nick/symfony/src/branch/main/docs/Controller.md)
 | 
				
			||||||
1. Run sass ```sass sass/project.sass public/css/main.css```
 | 
					1. Run sass ```sass sass/project.sass public/css/main.css```
 | 
				
			||||||
1. [Create your security](https://git.nickyeoman.com/nick/symfony/src/branch/main/docs/Security.md)
 | 
					1. [Create your security](https://git.nickyeoman.com/nick/symfony/src/branch/main/docs/Security.md)
 | 
				
			||||||
 | 
				
			|||||||
@ -71,11 +71,11 @@ echo "Your twig.yaml config file has been replaced, remove the bak if you are ha
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
echo "Creating SASS directory for css"
 | 
					echo "Creating SASS directory for css"
 | 
				
			||||||
composer require nickyeoman/sassLibrary
 | 
					composer require nickyeoman/sassLibrary
 | 
				
			||||||
touch sass/$1.sass
 | 
					touch sass/project.sass
 | 
				
			||||||
mkdir -p public/css
 | 
					mkdir -p public/css
 | 
				
			||||||
touch public/css/main.css
 | 
					touch public/css/main.css
 | 
				
			||||||
echo '.sass-cache' >> .gitignore
 | 
					echo '.sass-cache' >> .gitignore
 | 
				
			||||||
echo '@import ../vendor/nickyeoman/sasslibrary/master.sass' > sass/$1.sass
 | 
					echo '@import ../vendor/nickyeoman/sasslibrary/master.sass' > sass/project.sass
 | 
				
			||||||
echo "SASS installed you still need to run sass sass/$1.sass public/css/main.css"
 | 
					echo "SASS installed you still need to run sass sass/$1.sass public/css/main.css"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
@ -104,6 +104,7 @@ composer req debug logger
 | 
				
			|||||||
composer require symfony/security-bundle
 | 
					composer require symfony/security-bundle
 | 
				
			||||||
composer require form validator
 | 
					composer require form validator
 | 
				
			||||||
composer require symfonycasts/verify-email-bundle
 | 
					composer require symfonycasts/verify-email-bundle
 | 
				
			||||||
 | 
					composer require symfonycasts/reset-password-bundle
 | 
				
			||||||
 | 
					
 | 
				
			||||||
################################################################################
 | 
					################################################################################
 | 
				
			||||||
# Database
 | 
					# Database
 | 
				
			||||||
 | 
				
			|||||||
@ -12,7 +12,7 @@ And then follow the instructions.
 | 
				
			|||||||
This will create a entity class in src/Entity
 | 
					This will create a entity class in src/Entity
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Note: ** You can run make:entity again with the same Entity name to add more fields.
 | 
					**Note: ** You can run make:entity again with the same Entity name to add more fields.
 | 
				
			||||||
You will have to ehn drun make:migration and then doctrine:migrations:migrate
 | 
					You will have to run make:migration and then doctrine:migrations:migrate
 | 
				
			||||||
 | 
					
 | 
				
			||||||
The system is smart enough not to duplicate work.
 | 
					The system is smart enough not to duplicate work.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -5,21 +5,18 @@
 | 
				
			|||||||
Permissions are linked to a user object.
 | 
					Permissions are linked to a user object.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
php bin/console make:user
 | 
					symfony console make:user
 | 
				
			||||||
 | 
					symfony console make:auth # (1 for login form)
 | 
				
			||||||
 | 
					symfony console make:registration-form
 | 
				
			||||||
 | 
					symfony console make:reset-password
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
Now you will want to sync the databse
 | 
					Now you will want to sync the database (using docker)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
```bash
 | 
					```bash
 | 
				
			||||||
php bin/console make:migration
 | 
					sudo docker-compose run symfony php bin/console make:migration
 | 
				
			||||||
php bin/console doctrine:migrations:migrate
 | 
					sudo docker-compose run symfony php bin/console doctrine:migrations:migrate
 | 
				
			||||||
```
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
## Registration Form
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
You can use maker to do this (symfonycasts/verify-email-bundle must be installed, which is done through the install script)
 | 
					 | 
				
			||||||
```bash
 | 
					 | 
				
			||||||
php bin/console make:registration-form
 | 
					 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					Note: 'symfony' is the name of your symfony app in docker-compose (such as app)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Login Form
 | 
					## Login Form
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user