Rewrite tabulation #14
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace App\Actions\Tabulation;
|
||||
|
||||
interface CalculateEntryScore
|
||||
{
|
||||
public function __invoke($mode, $entry): array;
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Http\Controllers\Tabulation;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Entry;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class SeatAuditionController extends Controller
|
||||
|
|
@ -12,6 +13,15 @@ class SeatAuditionController extends Controller
|
|||
*/
|
||||
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,
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue