[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 bin/console translation:update --dump-messages --force en # template from AppBundle/Resources php bin/console translation:update --dump-messages --force fr AppBundle php bin/console translation:update --dump-messages --force en AppBundle  


[Solution] Symfony SwiftMailer multiple recipients

You can use an “array” : $to = array( "user1@gmail.com" => "User 1", "user2@gmail.com" => "User 2" );   Example : $subject = "User"; $to = array( "user1@gmail.com" => "User 1", "user2@gmail.com" => "User 2" ); $from = "contact@become-developer.com"; $name = "Become Developer"; $body = "content"; $message = \Swift_Message::newInstance() ->setSubject($subject) ->setFrom($from) ->setTo($to) ->setBody($body) /* *

Read More


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", "LangueBundle\\": "src/LangueBundle", "PaymentALBundle\\": "src/PaymentALBundle" }, "classmap": [ "app/AppKernel.php", "app/AppCache.php" ] }, Et puis ex√©cuter cette commande : composer dumpautoload  


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 entity php bin/console generate:doctrine:crud Cleach cache php bin/console cache:warmup