diff --git a/Seance5-6/seance/src/controller/IndexController.php b/Seance5-6/seance/src/controller/IndexController.php index 0f0949f1e0d1a2e65cb95566f1c46b578abb2d14..9688da3f0b3b3cc3ab7b2b49a9d0c897d2fdf822 100644 --- a/Seance5-6/seance/src/controller/IndexController.php +++ b/Seance5-6/seance/src/controller/IndexController.php @@ -33,8 +33,8 @@ class IndexController $game = Game::select('id','name','alias','deck')->where('id','<=','200')->get(); // $game = Game::where('id','=',1)->get(); // $json = json_encode($game,JSON_FORCE_OBJECT); - $json = '{ "games" : [ '; foreach($game as $key => $value) { +<<<<<<< HEAD $json = $json . json_encode($value) . ','; /*$json = $json . '{ "id": ' . $value->id . ', @@ -53,6 +53,11 @@ class IndexController } } $json = $json . ']}'; +======= + $value->description = "..."; + } + $json = json_encode($game); +>>>>>>> e2c791070c5330916f63fb55c2b639a71a327bcb $cq2 = new VuePartie2($json); $cq2->render();*/ } diff --git a/Seance5-6/seance/src/view/VuePartie2.php b/Seance5-6/seance/src/view/VuePartie2.php index a7c83edba117a886a942221ae1b4631a62152540..892645ff4691e38cb9fdf8610597520ae852402b 100644 --- a/Seance5-6/seance/src/view/VuePartie2.php +++ b/Seance5-6/seance/src/view/VuePartie2.php @@ -21,12 +21,11 @@ class VuePartie2 <link rel="stylesheet" href="css/main.css"> - <title>photobox</title> + <title>AppliBD</title> </head> <body> - <h1>Titre</h1> - <p>$json</p> + $json </body> END;