created a classifier and draw generator
This commit is contained in:
1 parent
fec7cb655b
commit
3fe9417af4
4 files changed
+333
-1
No files matched your search
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Route;
|
||||
use app\Helpers\FighterClassification;
|
||||
use App\Models\Member;
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
@@ -16,3 +19,20 @@ use Illuminate\Support\Facades\Route;
|
||||
Route::get('/', function () {
|
||||
return view('welcome');
|
||||
});
|
||||
|
||||
|
||||
Route::get('/find', function () {
|
||||
$fighters = \App\Models\Member::all()->toArray();
|
||||
|
||||
// Call global function with leading backslash to avoid namespace issue
|
||||
$groupedJson = \groupFighters($fighters, 2025);
|
||||
|
||||
return response($groupedJson, 200)->header('Content-Type', 'application/json');
|
||||
});
|
||||
|
||||
Route::get('/taekwondo-draw', function () {
|
||||
$fighters = Member::all()->toArray();
|
||||
$draws = groupFightersWithTaekwondoDraw($fighters, 2025); // Change year if you want
|
||||
return response()->json($draws, 200);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user