Response
{warning} Response类用于响应表单提交和文件/图片上传时的请求,命名空间:
- Response
FormBuilder\Response
表单提交成功
$response = Response::success('表单提交成功');
表单提交失败
$response = Response::fail('表单参数有误');
图片/文件上传成功
$fileUrl = '/upload/1123501u524a.jpg';
$response = Response::uploadSuccess($fileUrl, '上传成功');
图片/文件上传失败
$response = Response::uploadFail('上传失败');
$response 为 Symfony\Component\HttpFoundation\Response 实例,根据你的框架情况来决定如何处理响应。