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

11 lines
290 B
PHP
Raw Normal View History

2021-03-11 12:21:16 +00:00
<?php
use Backend\Models\Vote;
2021-03-16 11:46:44 +00:00
require_once "../../../bootstrap.php";
2021-03-11 12:21:16 +00:00
require_once "../Group/Group.php";
if(isLogin()){
header('Content-Type: application/json;charset=UTF-8');
2021-03-12 13:05:31 +00:00
echo Vote::where('group_id',groupViaToken($_SESSION['token'])->id)->get()->toJson(JSON_PRETTY_PRINT);
2021-03-11 12:21:16 +00:00
}