tzookb/api-responder

laravel api response helper
17
Install
composer require tzookb/api-responder
Latest Version:0.01
License:MIT
Last Updated:Jun 24, 2015
Links: GitHub  ·  Packagist
Maintainer: tzookb

Simplifying the Api response

this package was built for easying the return of an api reponse, currently it returns only json, but could easily support xml or whatever...

the use is easy:

  return $apiResponder
        ->setData(['someData'=>1, 'someData2'=>2])
        ->setMeta(['page'=>1, 'extra'=>'for_info_stuff'])
        ->setRef(1) //defaults to 1, this is for the general api code, like 0 success, 1 data error, 2 auth error etc
        ->respond(); //and this returns the "Response" object currently JsonResponse

Related Packages

mesingh/amazon-mws-laravel

Use Amazon's MWS web services with Laravel 5.x. Based on przemekperon/amazon-mws...

1,623 2
php-tmdb/laravel

Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the...

53,306 162
atehnix/laravel-vk-requester

Laravel package for Vk.com API

3,446 74