Download the PHP package truegameover/laravel-api-response-builder without Composer

On this page you can find all versions of the php package truegameover/laravel-api-response-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-api-response-builder

REST API Response Builder for Laravel

Latest Stable Version Build Status Code Quality Code Coverage Codacy Grade Badge Monthly Downloads License

SensioLabs Insight

Unstable Version Unstable Build Status Ustable Code Quality Unstble Code Coverage

Table of contents


Introduction

ResponseBuilder is a Laravel helper designed to build nice, normalized and easy to consume REST API JSON responses.

Benefits

ResponseBuilder is written for REST API developers by REST API developer and is based on my long lasting experience on both "sides" (API dev and API consumer) of variety of REST APIs. Lightweight, with simple to use public methods, covering multiple potential use-cases, on-the-fly data conversion, localization support, automatic error message building, support for chained APIs and (hopefully) exhaustive documentation. But that's not all! The JSON structure produced by ResponseBuilder is designed with users of your API in mind, which helps them easily deal with your API with ease. They get simple, well defined and predictable JSON structure responses with all the fields needed to consume it without any unnecessary a hassle nor other trickery.

Android developers can use ApiResponse library to handle ResponseBuilder responses produced in their mobile applications.

You are even covered in a case of emergency as provided Exception Handler ensures your API keeps talking JSON (and not HTML) to its clients if case of any unexpected and unhandled exception.

Did I mention, you also get testing traits that would automatically cover your whole ResponseBuilder related code with unit tests with just a few lines of code?

Usage examples

Operation successful? Conclude your controller method with:

return ResponseBuilder::success();

and your client will get nice JSON like

{
  "success": true,
  "code": 0,
  "locale": "en",
  "message": "OK",
  "data": null
}

Something went wrong? Just type:

return ResponseBuilder::error(250);

The following JSON response will then be returned:

{
   "success": false,
   "code": 250,
   "locale": "en",
   "message": "Your error message for code 250",
   "data": null
}

Nice and easy! And yes, message can be easily customized! Also there're much, much more you can do with rich ResponseBuilder API. See library documentation for details and more examples!


Features


License


All versions of laravel-api-response-builder with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.0
laravel/framework Version >= 6.0
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package truegameover/laravel-api-response-builder contains the following files

Loading the files please wait ....