You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

27 lines
601 B

<?php
namespace App\Controller\v3;
use App\Controller\BaseController;
use App\Service\v3\Interfaces\CategoryServiceInterface;
use Hyperf\Di\Annotation\Inject;
class CategoryController extends BaseController
{
/**
* @Inject
* @var CategoryServiceInterface
*/
protected $categoryService;
/**
* 获取分类页所有分类
* 1、无参数
* 2、远程关联获取所有分类信息
* @return \Psr\Http\Message\ResponseInterface
*/
public function all()
{
return $this->success(['category' => $this->categoryService->all()]);
}
}