From 913442bfb25c88d621fe0abeda581566e87a5abd Mon Sep 17 00:00:00 2001
From: Cahit PERCIN <cahit.percin7@etu.univ-lorraine.fr>
Date: Wed, 11 Mar 2020 10:50:02 +0100
Subject: [PATCH] debut de la partie 1, 1 erreurs

---
 GamePedia/php/script_TD3a.php                  | 3 +++
 GamePedia/src/controleurs/ControleurScript.php | 6 ++++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/GamePedia/php/script_TD3a.php b/GamePedia/php/script_TD3a.php
index 4abffbb..33c8e7a 100644
--- a/GamePedia/php/script_TD3a.php
+++ b/GamePedia/php/script_TD3a.php
@@ -25,8 +25,11 @@ echo ("<!DOCTYPE html>
 
     $c = new ControleurScript();
     echo $c->allGame();
+    echo '<br>';
     echo $c->gameMario();
+echo '<br>';
     echo $c->gameDebMario();
+echo '<br>';
     echo $c->gameDebMarioRate();
 
 echo ("</body> </html>");
\ No newline at end of file
diff --git a/GamePedia/src/controleurs/ControleurScript.php b/GamePedia/src/controleurs/ControleurScript.php
index 0d6d155..f659167 100644
--- a/GamePedia/src/controleurs/ControleurScript.php
+++ b/GamePedia/src/controleurs/ControleurScript.php
@@ -241,7 +241,10 @@ class ControleurScript
 
     public function gameDebMario(){
         $time_start = microtime(true);
-        Game::where('name', 'like', "Mario%")->characters()->get();
+        $q= Game::where('name', 'like', "Mario%")->get();
+        foreach ($q as $game) {
+            $game->characters()->get();
+        }
         $time_end = microtime(true);
         $time = $time_end - $time_start;
         return $time;
@@ -255,5 +258,4 @@ class ControleurScript
         return $time;
     }
 
-
 }
\ No newline at end of file
-- 
GitLab