Files
ctf/cscg25/web/canteenfood/challenge/controllers/CanteenController.php
2025-03-24 22:03:34 +01:00

13 lines
323 B
PHP

<?php
class CanteenController
{
public function index($router)
{
$food = new CanteenModel(0);
if(isset($_GET['price'])) {
return $router->view('index', ['food' => $food->filterFood($_GET['price'])]);
}
return $router->view('index', ['food' => $food->getFood()]);
}
}