..
This commit is contained in:
@@ -34,7 +34,7 @@ abstract class AetherController
|
||||
/**
|
||||
* 获取单个资源 (RESTFul: GET /resources/{id})
|
||||
*/
|
||||
public function show(int $id): array
|
||||
public function detail(int $id): array
|
||||
{
|
||||
$result = $this->getService()->detail($id);
|
||||
return AetherResponse::success($result);
|
||||
@@ -43,7 +43,7 @@ abstract class AetherController
|
||||
/**
|
||||
* 创建资源 (RESTFul: POST /resources)
|
||||
*/
|
||||
public function store(): array
|
||||
public function create(): array
|
||||
{
|
||||
$data = $this->request->all();
|
||||
$id = $this->getService()->create($data);
|
||||
@@ -63,7 +63,7 @@ abstract class AetherController
|
||||
/**
|
||||
* 删除资源 (RESTFul: DELETE /resources/{id})
|
||||
*/
|
||||
public function destroy(int $id): array
|
||||
public function delete(int $id): array
|
||||
{
|
||||
$this->getService()->delete($id);
|
||||
return AetherResponse::success(null, '删除成功');
|
||||
@@ -71,8 +71,7 @@ abstract class AetherController
|
||||
|
||||
/**
|
||||
* 获取对应的服务类
|
||||
* @return AbstractService
|
||||
* @return AetherCrudService
|
||||
*/
|
||||
abstract protected function getService(): AbstractService;
|
||||
|
||||
abstract protected function getService(): AetherCrudService;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user