get votes and winner

This commit is contained in:
2021-03-11 13:21:16 +01:00
parent 1d1606ff13
commit f10f27fe25
4 changed files with 40 additions and 4 deletions
+4 -4
View File
@@ -2,11 +2,11 @@
require_once "../../../bootstrap.php";
use Backend\Models\Group;
if (isset($_POST["groupId"])){
$groups = Group::find($_POST["groupId"]);
if (isset($_GET["groupId"])){
$groups = Group::find($_GET["groupId"]);
}
elseif(isset($_POST["gameJameId"])){
$groups = Group::where("game_jam_id",$_POST["gameJameId"]);
elseif(isset($_GET["gameJameId"])){
$groups = Group::where("game_jam_id",$_GET["gameJameId"])->get();
}
else{
$groups = Group::all();