Files
hyperf_service/app/Controller/Api/GoodController.php
2025-01-22 11:04:12 +08:00

26 lines
674 B
PHP

<?php
namespace App\Controller\Api;
use App\Controller\AbstractController;
use App\Service\Api\Good\MealListService;
use App\Service\Api\Good\OptionalListService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\Validation\Annotation\Scene;
#[Controller(prefix: 'api/good')]
class GoodController extends AbstractController
{
#[RequestMapping(path: 'optional',methods: 'GET')]
public function optional()
{
return (new OptionalListService)->handle();
}
#[RequestMapping(path: 'meal',methods: 'GET')]
public function meal()
{
return (new MealListService)->handle();
}
}