diff --git a/composer.json b/composer.json index df4bfc2..fce1394 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "require": { "twig/twig": "^3.0", "ext-pdo": "*", - "altorouter/altorouter": "^2.0" + "altorouter/altorouter": "^2.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index ac0a03b..32a9531 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,6 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], -<<<<<<< HEAD "content-hash": "68804b2111cb6b8bf6edf66cb2b4669c", "packages": [ { @@ -68,11 +67,6 @@ "time": "2020-03-09T08:34:59+00:00" }, { -======= - "content-hash": "e4bbfb6f07dd88c6288177f48b9cb54c", - "packages": [ - { ->>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d "name": "symfony/deprecation-contracts", "version": "v3.5.0", "source": { @@ -457,20 +451,12 @@ "packages-dev": [], "aliases": [], "minimum-stability": "stable", -<<<<<<< HEAD - "stability-flags": [], -======= "stability-flags": {}, ->>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d "prefer-stable": false, "prefer-lowest": false, "platform": { "ext-pdo": "*" }, -<<<<<<< HEAD - "platform-dev": [], -======= "platform-dev": {}, ->>>>>>> 8f986a30433c4424563cac3b838b80c8e6a12f1d "plugin-api-version": "2.6.0" } diff --git a/vue/quote.php b/vue/quote.php index 30752cc..8c2adf0 100644 --- a/vue/quote.php +++ b/vue/quote.php @@ -1,9 +1,13 @@ false )); - $value = 'Salva'; + // appele avec index.php ne pas metre si controleur fonctionnel + require __DIR__ . '/../vendor/autoload.php'; + + $loader = new \Twig\Loader\FilesystemLoader('templates'); + $twig = new \Twig\Environment($loader, [ + 'cache' => false, + ]); + // echo $twig->render('quote.html', array( 'srcImg' => "../default.jpg", @@ -11,6 +15,15 @@ 'quoteContent' => "je test la page", 'sourceName' => "une source", 'dateSortie' => "1999", - 'nbLike' => "0" -)); + 'nbLike' => "0", + 'comment'=> array( + array( + 'user'=>'toto', + 'content'=>'12345674fkjgvhgtfoidshfziutgfos' + ), + array( + 'user'=> 'tata', + 'content'=>'azertyuiopqsdfghjklmwxcvbn' + ) +))); ?> \ No newline at end of file diff --git a/vue/quote.html b/vue/templates/quote.html similarity index 73% rename from vue/quote.html rename to vue/templates/quote.html index 395115d..c35ecd8 100644 --- a/vue/quote.html +++ b/vue/templates/quote.html @@ -25,7 +25,12 @@
{{ com.user }}
+{{ com.content }}
+ {% endfor %}