30 lines
646 B
PHP
30 lines
646 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Controller\Api;
|
|
|
|
use App\Middleware\Api\JwtAuthMiddleware;
|
|
use App\Service\Api\Chef\IndexService;
|
|
use Hyperf\HttpServer\Annotation\Controller;
|
|
use Hyperf\HttpServer\Annotation\Middlewares;
|
|
use Hyperf\HttpServer\Annotation\RequestMapping;
|
|
use Hyperf\Validation\Annotation\Scene;
|
|
|
|
#[Controller(prefix: 'api/chef')]
|
|
#[Middlewares([
|
|
JwtAuthMiddleware::class,
|
|
])]
|
|
class ChefController
|
|
{
|
|
/**
|
|
* @return array
|
|
*/
|
|
#[RequestMapping(path: "index", methods: "GET")]
|
|
#[Scene(scene: "index")]
|
|
public function index(): array
|
|
{
|
|
return (new IndexService)->handle();
|
|
}
|
|
}
|