Category: Symfony 3

[Solution] Symfony 3 easy translation

For twig base.html.twig : <p{{ ‘message’|trans }}</p> Create or update your files translation : # tempate from app/Resources php bin/console translation:update –dump-messages –force fr php

Symfony3 ClassNotFoundException after bundle creation

Il faut imp√©rativement ajouter son bundle dans le fichier composer.json comme ceci par exemple   “autoload”: { “psr-4”: { “AppBundle\\”: “src/AppBundle”, “Acme\\Bundle\\BlogBundle\\”: “src/Acme/Bundle/BlogBundle”, “BlogBundle\\”: “src/BlogBundle”,

Console Command Symfony 3

Create a database php bin/console doctrine:database:create Update database php app/console doctrine:schema:update –force Create a bundle php bien/console generate:bundle Create a entity php bin/console generate:doctrine:entity Crud