Check to make sure you have mod_rewrite enabled.

Under Apache 2+

sudo a2enmod rewrite && sudo service apache2 restart

or

sudo a2enmod rewrite && sudo /etc/init.d/apache2 restart

 

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)
            /*
             * If you also want to include a plaintext version of the message
            ->addPart(
                $this->renderView(
                    'Emails/registration.txt.twig',
                    array('name' => $name)
                ),
                'text/plain'
            )
            */
        ;

        // or, you can also fetch the mailer service this way
        // $this->get('mailer')->send($message);
        return $this->mailer->send($message);

 

This error appear because your type not a “Array”

 

Change type to “array”

    /**
     * @var string
     *
     * @ORM\Column(name="informations", type="array")
     * */
    private $informations;

Then update your database with Command Symfony

Tip :

var url = '{{ path("yourroute", {'id': 'id'}) }}'; 
url = url.replace("id", this.value);

window.location.href = url;

 

app.request.get('id')

 

Define the real entity:

 * @ORM\Entity

For example

Before :

<?php

namespace BookingBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Table(name="booking")
 */
class Booking
{

After :

<?php

namespace BookingBundle\Entity;

use Doctrine\ORM\Mapping as ORM;

/**
 * @ORM\Entity
 * @ORM\Table(name="booking")
 */
class Booking
{

 

I share with you the solution :

Create a link /var/www

sudo ln -s /usr/share/phpmyadmin /var/www/
sudo nano /etc/apache2/apache2.conf

Then add the following line :

Include /etc/phpmyadmin/apache.conf

then Restart your apache

sudo service apache2 reload

 

 

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

 

Grâce à cette astuce vous allez pouvoir git add . & git commit et git push en 1 seule commande !

Add these lines in your conso :

function lazygit() {
git add .
git commit -a -m "$1"
git push
}

Try it :

lazygit "first push"

Easy and fast !

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