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

13 lines
295 B
PHP

<?php
require_once "../../../bootstrap.php";
use Backend\Models\GameJam;
if(isset($_GET['gameJamId'])){
$dbValue = GameJam::find($_GET['gameJamId']);
}else{
$dbValue = GameJam::all();
}
header('Content-Type: application/json;charset=UTF-8');
echo $dbValue->toJson(JSON_PRETTY_PRINT);