fixed some stuff
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
require_once "../../../bootstrap.php";
|
||||
use \Backend\Models\GameData;
|
||||
use \Backend\Models\Group;
|
||||
use \Backend\Models\GameJam;
|
||||
|
||||
|
||||
|
||||
if(isset($_GET['gameDataId'])){
|
||||
$openGameDataStream = GameData::find($_GET['gameDataId']);
|
||||
}elseif(isset($_GET['groupId'])){
|
||||
$openGameDataStream = Group::find($_GET['groupId'])->GameData();
|
||||
}elseif (isset($_GET['gameJamId'])){
|
||||
$openGameDataStream = Group::where("game_jam_id",$_GET['gameJamId'])->GameData();/*->pluck("id")->toArray()*/;
|
||||
}else{
|
||||
$openGameDataStream = GameData::all();
|
||||
}
|
||||
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $openGameDataStream ->toJson(JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user