2021-03-09 09:45:05 +00:00
|
|
|
<?php
|
2021-03-16 12:19:17 +00:00
|
|
|
require_once (realpath(dirname(__FILE__) ."/../../../bootstrap.php"));
|
2021-03-10 10:23:40 +00:00
|
|
|
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-16 11:25:22 +00:00
|
|
|
header("Access-Control-Allow-Origin: *");
|
|
|
|
header("Access-Control-Allow-Methods: GET");
|
|
|
|
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
|
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);
|