
laravel框架控制器在接口输出数据中最外层添加字段public function index($request) { $result $this-testAppService-getAll($request); $response $this-success($result)-respond(); $responseData $response-getData(); // 添加 can_edit 字段 $responseData-can_edit $this-checkCanEditPermission(); return response()-json($responseData, 200, [], JSON_UNESCAPED_UNICODE); }