onexcrm/response-structure 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

onexcrm/response-structure

最新稳定版本:v1.0.1

Composer 安装命令:

composer require onexcrm/response-structure

包简介

Create useful api or service response structure easily.

README 文档

README

Create response structure for API call or Service call - easily.

Installation

composer require onexcrm/response-structure

Laravel without auto-discovery:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php

Onex\Responsestructure\OnexResponseStructureServiceProvider::class,

If you want to use the facade to log messages, add this to your facades in app.php:

'OnexResponse'=> Onex\Responsestructure\Responsestructure\ResponseStructureClassFacade::class,

How to use?:

/**
 * 1st @param  array $dataBag
 * 2nd @param  string $responseMessage (default = '')
 * 3rd @param  string $bodyMessageTitle (default = '')
 * 4th @param  string $bodyMessage (default = '')
 * 5th @param  string $messageType (default = 'success')
 * 6th @param  string $responseStatus (default = '200')
 * 7th @param  string $responseType (default = 'success')
 * 8th @param  string $httpCode (default = '200')
*/

Example #1 (Array Format)

$getResponse = OnexResponse::constructResponse($userData, 'User list found');
dd($getResponse);

Example #2 (Json Format)

$getResponse = OnexResponse::constructResponseJson($userData, 'User list found');
dd($getResponse);

Example #3 (Json Object Response Format)

$getResponse = OnexResponse::constructResponseJsonObject($userData, 'User list found');
dd($getResponse);

Sample Response

onex_resstruc

Feel free to contact me: Arindam Roy arindam.roy.developer@gmail.com

Thanks

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固