Allowance check
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\API\v1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Http\Controllers\Util;
|
||||
use App\Voter;
|
||||
|
||||
/**
|
||||
* Unauthenticated list of physical (Fizikal) attendees for roulette / display.
|
||||
*/
|
||||
class RouletteFizikalVotersController extends Controller
|
||||
{
|
||||
public function __invoke()
|
||||
{
|
||||
$electionId = Util::getCurrentElection();
|
||||
|
||||
$voters = Voter::query()
|
||||
->where('election_id', $electionId)
|
||||
->where('kehadiran', 1)
|
||||
->orderBy('no_anggota')
|
||||
->get(['id', 'name', 'no_anggota']);
|
||||
|
||||
return response()->json([
|
||||
'voters' => $voters,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user