Game-Jaming/Backend/Controllers/Polls/GetVote.php

11 lines
281 B
PHP
Raw Normal View History

2021-03-11 12:21:16 +00:00
<?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);
}