Game-Jaming/Backend/Controllers/GameJam/GetGameJam.php

13 lines
295 B
PHP
Raw Normal View History

2021-03-09 09:45:05 +00:00
<?php
2021-03-10 10:23:40 +00:00
require_once "../../../bootstrap.php";
use Backend\Models\GameJam;
2021-03-11 13:22:19 +00:00
if(isset($_GET['gameJamId'])){
$dbValue = GameJam::find($_GET['gameJamId']);
}else{
$dbValue = GameJam::all();
}
2021-03-10 10:23:40 +00:00
header('Content-Type: application/json;charset=UTF-8');
2021-03-11 13:22:19 +00:00
echo $dbValue->toJson(JSON_PRETTY_PRINT);