Add CalculateEntryScore Interface

This commit is contained in:
Matt Young 2024-07-10 00:31:19 -05:00
parent 120eaedeb5
commit 126032ae18
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,8 @@
<?php
namespace App\Actions\Tabulation;
interface CalculateEntryScore
{
public function __invoke($mode, $entry): array;
}

View File

@ -3,6 +3,7 @@
namespace App\Http\Controllers\Tabulation; namespace App\Http\Controllers\Tabulation;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Models\Entry;
use Illuminate\Http\Request; use Illuminate\Http\Request;
class SeatAuditionController extends Controller class SeatAuditionController extends Controller
@ -12,6 +13,15 @@ class SeatAuditionController extends Controller
*/ */
public function __invoke(Request $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,
];
}
} }
} }