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
+10
View File
@@ -0,0 +1,10 @@
<?php
use Backend\Models\Vote;
require "../../../bootstrap.php";
require_once "../Group/Group.php";
if(isLogin()){
header('Content-Type: application/json;charset=UTF-8');
echo Vote::where('group_id',groupViaToken($_SESSION['token']))->get()->toJson(JSON_PRETTY_PRINT);
}