├── .env ├── .gitignore ├── .idea ├── codeStyles │ └── codeStyleConfig.xml ├── modules.xml ├── php.xml ├── symfony-6-course.iml ├── vcs.xml └── workspace.xml ├── README.md ├── assets ├── app.js ├── bootstrap.js ├── controllers.json ├── controllers │ └── hello_controller.js ├── javascript │ ├── js.js │ └── js1.js └── styles │ └── app.css ├── bin └── console ├── composer.json ├── composer.lock ├── config ├── bundles.php ├── packages │ ├── assets.yaml │ ├── cache.yaml │ ├── doctrine.yaml │ ├── doctrine_migrations.yaml │ ├── framework.yaml │ ├── prod │ │ ├── doctrine.yaml │ │ └── webpack_encore.yaml │ ├── routing.yaml │ ├── security.yaml │ ├── test │ │ ├── doctrine.yaml │ │ ├── validator.yaml │ │ └── webpack_encore.yaml │ ├── twig.yaml │ ├── validator.yaml │ └── webpack_encore.yaml ├── preload.php ├── routes.yaml ├── routes │ ├── annotations.yaml │ └── framework.yaml └── services.yaml ├── migrations ├── .gitignore ├── Version20220212160836.php └── Version20220212182633.php ├── package-lock.json ├── package.json ├── public └── index.php ├── src ├── Controller │ ├── .gitignore │ ├── MoviesController.php │ ├── RegistrationController.php │ └── SecurityController.php ├── DataFixtures │ └── AppFixtures.php ├── Entity │ ├── .gitignore │ ├── Actor.php │ ├── Admin.php │ └── Movie.php ├── Form │ ├── MovieFormType.php │ └── RegistrationFormType.php ├── Kernel.php ├── Repository │ ├── .gitignore │ ├── ActorRepository.php │ ├── AdminRepository.php │ └── MovieRepository.php └── Security │ └── LoginFormAuthenticator.php ├── symfony.lock └── templates ├── base.html.twig ├── index.html.twig ├── login.html.twig ├── movies ├── create.html.twig ├── edit.html.twig ├── index.html.twig └── show.html.twig ├── register.html.twig ├── registration └── register.html.twig └── security └── login.html.twig /.env: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the latter taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # 13 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 14 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration 15 | 16 | ###> symfony/framework-bundle ### 17 | APP_ENV=dev 18 | APP_SECRET=63a09515f621d17cec11540238397071 19 | ###< symfony/framework-bundle ### 20 | 21 | ###> doctrine/doctrine-bundle ### 22 | # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url 23 | # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml 24 | # 25 | # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" 26 | # DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7" 27 | DATABASE_URL="mysql://root:@127.0.0.1:3306/movies?serverVersion=5.7" 28 | ###< doctrine/doctrine-bundle ### 29 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ###> symfony/framework-bundle ### 2 | /.env.local 3 | /.env.local.php 4 | /.env.*.local 5 | /config/secrets/prod/prod.decrypt.private.php 6 | /public/bundles/ 7 | /var/ 8 | /vendor/ 9 | ###< symfony/framework-bundle ### 10 | 11 | ###> symfony/webpack-encore-bundle ### 12 | /node_modules/ 13 | /public/build/ 14 | npm-debug.log 15 | yarn-error.log 16 | ###< symfony/webpack-encore-bundle ### 17 | -------------------------------------------------------------------------------- /.idea/codeStyles/codeStyleConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/php.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | -------------------------------------------------------------------------------- /.idea/symfony-6-course.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 34 | 35 | 44 | 45 | 50 | 51 | 56 | 57 | 58 | 59 | {% endblock %} 60 | -------------------------------------------------------------------------------- /templates/movies/create.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "./base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 |

6 | Create Movie 7 |

8 | 9 | {{ form_start(form) }} 10 | 11 | {{ form_widget(form) }} 12 | 17 | 18 | {{ form_end(form) }} 19 |
20 | {% endblock %} 21 | -------------------------------------------------------------------------------- /templates/movies/edit.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "./base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 |

6 | Create Movie 7 |

8 | 9 | {{ form_start(form) }} 10 | 11 | {{ form_widget(form) }} 12 | 13 | 18 | 19 | {{ form_end(form) }} 20 |
21 | {% endblock %} 22 | -------------------------------------------------------------------------------- /templates/movies/index.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "./base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 |
6 |

7 | Movies Review ({{ movies|length }}) 8 |

9 | 10 | 11 | Created by Code With Dary 12 | 13 |
14 |
15 | 16 | {% if app.user %} 17 | 24 | {% endif %} 25 | 26 |
27 | 28 | {% for movie in movies %} 29 |
30 | 35 | 36 |

37 | {{ movie.title }} 38 |

39 | 40 | 41 | By Code With Dary | 28.01.2022 42 | 43 | 44 |

45 | {{ movie.description }} 46 |

47 | 48 | 49 | Keep Reading 50 | 51 |
52 | {% endfor %} 53 |
54 | {% endblock %} -------------------------------------------------------------------------------- /templates/movies/show.html.twig: -------------------------------------------------------------------------------- 1 | {% extends "./base.html.twig" %} 2 | 3 | {% block body %} 4 |
5 |

6 | {{ movie.title }} 7 |

8 | 9 |
10 |
11 |

12 | Created by: Code With Dary 13 |

14 | 15 |

16 | 28-01-2022 4 min. read 17 |

18 |
19 |
20 | 21 | Icon of Code With Dary 26 | 27 |

28 | {{ movie.description }} 29 |

30 | 31 | {% if app.user and movie.userId == app.user.id %} 32 | 35 | Edit Movie 36 | 37 | 38 | 41 | Delete Movie 42 | 43 | {% endif %} 44 |
45 | {% endblock %} -------------------------------------------------------------------------------- /templates/register.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Register{% endblock %} 4 | 5 | {% block body %} 6 |
7 |
8 |

9 | Register 10 |

11 | 12 | {{ form_start(registrationForm) }} 13 | {{ form_row(registrationForm.email) }} 14 | {{ form_row(registrationForm.plainPassword) }} 15 | 16 | {{ form_row(registrationForm.agreeTerms) }} 17 | 18 | 23 | 24 | {{ form_end(registrationForm) }} 25 | 26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /templates/registration/register.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Register{% endblock %} 4 | 5 | {% block body %} 6 |
7 |
8 |

9 | Register 10 |

11 | 12 | {{ form_start(registrationForm) }} 13 | {{ form_row(registrationForm.email) }} 14 | {{ form_row(registrationForm.plainPassword) }} 15 | 16 | {{ form_row(registrationForm.agreeTerms) }} 17 | 18 | 23 | 24 | {{ form_end(registrationForm) }} 25 | 26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /templates/security/login.html.twig: -------------------------------------------------------------------------------- 1 | {% extends 'base.html.twig' %} 2 | 3 | {% block title %}Log in!{% endblock %} 4 | 5 | {% block body %} 6 |
7 | {% if error %} 8 |
{{ error.messageKey|trans(error.messageData, 'security') }}
9 | {% endif %} 10 | 11 | {% if app.user %} 12 |
13 | You are logged in as {{ app.user.email }}, Logout 14 |
15 | {% endif %} 16 | 17 |
18 |
19 |

20 | Login 21 |

22 | 23 | 34 | 35 | 44 | 45 | 50 | 51 | 56 | 57 |
58 |
59 | {% endblock %} 60 | --------------------------------------------------------------------------------