Builds nice, normalized and easy to consume REST JSON responses for Laravel powered APIs.
MIT License
Bot releases are visible (Hide)
validateResponseStructure()
method is now publictrace
leafdata
leaf. Instead, it adds debug
dictionary to root data structure.unauthenticated()
in Exception Handler. See new config keys defailsFormRequests
and returns all messages in ResponseBuilder::KEY_MESSAGES
HttpResponse::HTTP_UNAUTHORIZED
exception is now handled same way authentication_exception
isUnit Testing your ApiCodes
docs for detailsApiCodeBase
class is now named BaseApiCodes
success()
now allows to return API code as welluse
entriesgetMinCode()
and getMaxCode()
are now public
CONFIG:
message prefix nowerror_code
param to api_code
in all the method signatures:api_code
is now code placeholder in strings (:error_code
is no longer supported)DEFAULT_HTTP_CODE_xxx
if you need to know themApiCodeBase::getMap()
now ensures map
config entry of expected array
typesuccessWithCode()
methodencoding_options
to control data-to-json conversion.data
argumentdebug
node to make it more clear where it comes from