Get Group
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
require_once "../../../bootstrap.php";
|
||||
use Backend\Models\Group;
|
||||
|
||||
if (isset($_POST["GroupId"])){
|
||||
$groups = Group::find($_POST["GroupId"]);
|
||||
}
|
||||
elseif(isset($_POST["gameJameId"])){
|
||||
$groups = Group::where("game_jam_id",$_POST["gameJameId"]);
|
||||
}
|
||||
else{
|
||||
$groups = Group::all();
|
||||
}
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
echo $groups->toJson(JSON_PRETTY_PRINT);
|
||||
Reference in New Issue
Block a user