Commit e2c79107 authored by KELBERT Paul's avatar KELBERT Paul
Browse files

partie 2

parent 5c290c5f
......@@ -20,26 +20,10 @@ 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) {
$json = $json . json_encode($value) . ',';
/*$json = $json . '{
"id": ' . $value->id . ',
"name":' . $value->name . ',
"deck":' . $value->deck . ',
},
';*/
if ($value->id == 200) {
$json = $json . json_encode($value);/*
$json = $json . '{
"id": ' . $value->id . ',
"name":' . $value->name . ',
"deck":' . $value->deck . ',
}
';*/
}
}
$json = $json . ']}';
$value->description = "...";
}
$json = json_encode($game);
$cq2 = new VuePartie2($json);
$cq2->render();
}
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment