laravel 自定义错误返回

    /**
     * @param $code
     * @param $message
     * @param $subCode
     * @param $subMessage
     * @return array
     */
    protected function returnBadResponse($code, $message, $subCode, $subMessage): array
    {
        return [
            'code'      => $code,
            'message'   => $message,
            'subCode'   => $subCode,
            'subMessage'=> $subMessage

        ];
    }

 

posted @ 2021-11-03 15:34  没事就更  阅读(282)  评论(0编辑  收藏  举报