2017 © Pedro Peláez
 

library response

Response is an helper class which handles HTTP response, status codes and messages returned from different functions. Useful for unifiying API responses.

image

jeykeu/response

Response is an helper class which handles HTTP response, status codes and messages returned from different functions. Useful for unifiying API responses.

  • Friday, January 8, 2016
  • by azibaloch
  • Repository
  • 1 Watchers
  • 1 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Response

Response is tiny PHP package which handles HTTP response, status codes and messages returned from different functions. Useful for unifiying API responses., (*1)

Installation

$ composer require jq/response

Laravel 5 Configuration

Add the following line to the providers array in app/config.php, (*2)

JunaidQadir\Response\ResponseServiceProvider::class

And the the following line to the aliases array in app/config.php, (*3)

'AjaxResponse' => JunaidQadir\Response\ResponseFacade::class

Standard PHP Usage

to return json in response of an AJAX request, (*4)

$response     = new \JunaidQadir\Response\Response();
echo $response->json('success', 'Thank You');
exit;

Laravel5 Usage

echo AjaxResponse::json('success', 'Thank You');

The Versions

08/01 2016

dev-master

9999999-dev http://junaidqadir.com

Response is an helper class which handles HTTP response, status codes and messages returned from different functions. Useful for unifiying API responses.

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

by Azeem Hassni