Files
hyperf_test/app/Controller/Test/CompositeController.php

35 lines
800 B
PHP

<?php
declare(strict_types=1);
namespace App\Controller\Test;
use App\Service\Test\Composite\FileService;
use App\Service\Test\Composite\PermissionService;
use Hyperf\HttpServer\Annotation\Controller;
use Hyperf\HttpServer\Annotation\RequestMapping;
use Hyperf\HttpServer\Contract\RequestInterface;
use Hyperf\HttpServer\Contract\ResponseInterface;
#[Controller(prefix: 'composite/test')]
class CompositeController
{
/**
* @return array
*/
#[RequestMapping(path: 'file', methods: 'GET')]
public function file(): array
{
return (new FileService)->handle();
}
/**
* @return array
*/
#[RequestMapping(path: 'permission', methods: 'GET')]
public function permission(): array
{
return (new PermissionService)->handle();
}
}