strever/resp-code

a naming conventions about response code

2.0.1 2016-11-21 06:20 UTC

This package is not auto-updated.

Last update: 2024-10-04 22:05:38 UTC


README

a naming convention about response code

Installation

composer require strever/resp-code

Usage Docs

\Strever\Util\Resp::success(['id' => 1]);

\Strever\Util\Resp::fail(404);

\Strever\Util\Resp::notFound();

api list

  • fail
  • failWithJson
  • notFound
  • invalidParams
  • success
  • successWithJson ...

UnitTest

$ phpunit tests/Util/RespTest.php

Contact

<strever@.qq.com>

Other Resources

Donate Me

Alipay

License

MIT