2017 © Pedro Peláez
 

library think-apicode

apicode for thinkphp5

image

ppeerit/think-apicode

apicode for thinkphp5

  • Thursday, November 10, 2016
  • by ppeerit
  • Repository
  • 2 Watchers
  • 3 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 8 % Grown

The README.md

think-apicode

think-apicode 是基于thinkphp5的简单的接口数据生成工具, (*1)

安装

composer require ppeerit\apicode

配置

在扩展配置目录新建配置文件apicode.php, (*2)

return [
    'type' => 'json',//输出格式
];

加载

use Ppeerit\Apicode\Apicode;

使用

输出错误信息, (*3)

// 参数为[错误信息,错误代码,数组形式的数据];
Apicode::error(['error message','9999', $data]);

输出成功信息, (*4)

// 参数为[成功信息,跳转地址,数组形式的数据];
Apicode::success(['success message',$url, $data]);

The Versions

10/11 2016

dev-master

9999999-dev

apicode for thinkphp5

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar ppeerit

10/11 2016

v0.0.1

0.0.1.0

apicode for thinkphp5

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

by Avatar ppeerit