fixed some stuff in gamejam

This commit is contained in:
neerholt
2021-03-11 14:22:19 +01:00
parent f10f27fe25
commit a31ed44bdd
2 changed files with 10 additions and 3 deletions
+8 -2
View File
@@ -2,6 +2,12 @@
require_once "../../../bootstrap.php";
use Backend\Models\GameJam;
$dbValue = GameJam::all()->toJson(JSON_PRETTY_PRINT);
if(isset($_GET['gameJamId'])){
$dbValue = GameJam::find($_GET['gameJamId']);
}else{
$dbValue = GameJam::all();
}
header('Content-Type: application/json;charset=UTF-8');
echo $dbValue;
echo $dbValue->toJson(JSON_PRETTY_PRINT);