update game jame

This commit is contained in:
2021-05-07 12:30:02 +02:00
parent e82588b955
commit 921c1ed876
4 changed files with 96 additions and 2 deletions
+14 -1
View File
@@ -11,7 +11,20 @@ use Backend\Models\GameJam;
if (isset($_GET['gameJamId'])) {
$dbValue = GameJam::find($_GET['gameJamId']);
} else {
}elseif (isset($_GET['hasEnded'])){
$hasEnded = $_GET['hasEnded'];
if($hasEnded == 0 OR $hasEnded == 1){
if ($hasEnded){
$dbValue = GameJam::where("is_finished",1)->get();
}else{
$dbValue = GameJam::where("is_finished",0)->get();
}
}
else{
$dbValue = GameJam::all();
}
}
else {
$dbValue = GameJam::all();
}