auditionadmin/app/Http/Controllers/Tabulation/SeatAuditionController.php

28 lines
686 B
PHP

<?php
namespace App\Http\Controllers\Tabulation;
use App\Http\Controllers\Controller;
use App\Models\Entry;
use Illuminate\Http\Request;
class SeatAuditionController extends Controller
{
/**
* Handle the incoming request.
*/
public function __invoke(Request $request)
{
$entryData = [];
$entries = Entry::forSeating()->with('student.school')->get();
foreach ($entries as $entry) {
$entryData[] = [
'rank' => 'xx',
'id' => $entry->id,
'studentName' => $entry->student->full_name(),
'schoolName' => $entry->student->school->name,
];
}
}
}