Skip to content

Instantly share code, notes, and snippets.

@freddan88
Last active January 31, 2021 12:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save freddan88/2cd50cec910bc6577fe80927490f3483 to your computer and use it in GitHub Desktop.
Save freddan88/2cd50cec910bc6577fe80927490f3483 to your computer and use it in GitHub Desktop.
GENERATE PROJECT:
> composer create-project symfony/skeleton "project_name"
> composer create-project symfony/website-skeleton "project_name"
COMPOSER COMMANDS:
> composer update
INSTALL PACKAGES:
> composer require make // Enable make commands to generate controllers and more
> composer require orm // Install doctrine orm to connect to database
> composer require annotations // Enable routes in controller
> composer require template // Install Twig-templating engine
> composer require server // Install devServer
> composer require dump // Enable dump-command
> composer require form validator // Enable use of forms in php-class
> composer require profiler // Debug bar for symfony-app
> composer require security // Lets you use auth and login
> composer require serializer // Install serializer form REST api
> composer require validator // Install validator for api-endpoints
> composer reqiure friendsofsymfony/rest-bundle // Install FOSRestBundle
> composer require sensio/framework-extra-bundle // Use model as function parameter
> composer require jwt-auth // Install package for jwt authbentication
> composer require "doctrine/orm" "doctrine/doctrine-bundle" "gesdinet/jwt-refresh-token-bundle" // Refresh JWT Token
> composer require http-client doctrine maker phpunit
> composer require nelmio/cors-bundle // Enable cors in application
> composer require asset
CONSOLE COMMANDS:
> php bin/console // List commands
> php bin/console cache:clear // Clear cache
> php bin/console make:controller MainController
> php bin/console server:run // Run server in terminal
> php bin/console doctrine:database:create // Create database configured in .env
> php bin/console make:entity // Will represent a table in your database
> php bin/console make:entity --regenerate // Update already created enteties with getters and setters
> php bin/console doctrine:schema:update (--force / --dump-sql) // Create table from entities
> php bin/console make:auth // Create authenticator och login-form
> php bin/console make:user // Use this before make:auth
> php bin/console debug:container // List all services
> php bin/console debug:router // List all routes
> php bin/console makecommand
> php bin/console make:form
LINKS:
Symfoni webiste
- https://symfony.com
Symfony Recipes Server
- https://flex.symfony.com
JWT Refresh Token
- https://github.com/markitosgv/JWTRefreshTokenBundle
Repository Symfoni API + JWT Authentication
- https://github.com/konshensx16/symfony-todo-backend
VIDEOS:
Symfony PHP Framework Tutorial - Full Course:
- https://www.youtube.com/watch?v=Bo0guUbL5uo
Symfony REST
- https://www.youtube.com/playlist?list=PLqhuffi3fiMN_jVxqlIAILEp4avoBH4wc
How to build simple CRUD API service with Symfony 5 for beginners (2020)
- https://www.youtube.com/watch?v=tbXpX4dAqjg
Symfony 5 Tutorial: Easy Admin 3 - Upload Multiple Files
- https://www.youtube.com/watch?v=dKX_yREDOmQ
Symfony 5 Real-time Chat App - Back-end [Part 1\4]
- https://www.youtube.com/watch?v=wnr2A4aKnPU
Symfony Tutorial [2021] Test Driven Development Full 80 Minute Course | Learn TDD using PHPUnit
- https://www.youtube.com/watch?v=TOa7JGbRwvk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment