Resp
class Resp
Resp
Constants
SUCCESS |
|
ERROR |
|
TOKEN_MISS |
|
TOKEN_TIMEOUT |
|
TOKEN_ERROR |
|
PARAM_ERROR |
|
SIGN_ERROR |
|
NO_AUTH |
|
INNER_ERROR |
|
Methods
__construct(int $code, string|MessageBag $message = '')
Resp constructor.
int
getCode()
返回错误代码
string
getMessage()
返回错误信息
array|Translator|string|null
__toString()
__toString
array
toArray()
to array
static array|string
desc(string $key = null)
No description
static JsonResponse|RedirectResponse
web(int $type, string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
错误输出
static JsonResponse|RedirectResponse
success(string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
返回成功输入
static JsonResponse|RedirectResponse
error(string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
返回错误数组
static array
custom(int $code, string $message = '')
返回自定义信息
Details
at line 57
__construct(int $code, string|MessageBag $message = '')
Resp constructor.
at line 117
int
getCode()
返回错误代码
at line 126
string
getMessage()
返回错误信息
at line 141
array|Translator|string|null
__toString()
__toString
at line 154
array
toArray()
to array
at line 166
static array|string
desc(string $key = null)
No description
at line 194
static JsonResponse|RedirectResponse
web(int $type, string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
错误输出
at line 263
static JsonResponse|RedirectResponse
success(string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
返回成功输入
at line 275
static JsonResponse|RedirectResponse
error(string|array|MessageBag $msg, string|null|array $append = null, array $input = null)
返回错误数组
at line 286
static array
custom(int $code, string $message = '')
返回自定义信息