New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tzookb/api-responder

laravel api response helper
17
Install
composer require tzookb/api-responder
Latest Version:0.01
Laravel:5
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

dfreer/zillow

Laravel 5 Zillow api wrapper. This code is a fork from vinceg/zillow

28,960 2
vincentwon/mws

Amazon MWS API for Laravel.

2,040 2
netsuitephp/netsuite-laravel

NetSuite PHP laravel provider wrapper

247,832 11
acidjazz/metapi

Laravel API helpers

174,308 29

Version History

Version Released Laravel License
0.01 5.* MIT