purwandi/responder

Transform your laravel eloquent model using fluent fractal API
93
Install
composer require purwandi/responder
PHP:>=5.5.9
License:MIT
Last Updated:Aug 23, 2016
Links: GitHub  ·  Packagist
Maintainer: purwandi

Laravel Responder

TLDR ;)

Installation

Install the package through Composer:

composer require purwandi/responder

Laravel

Registering the Service Provider

After updating Composer, append the following service provider to the providers key in config/app.php

Purwandi\Responder\ResponderServiceProvider::class

Registering the Facade

If you like facades you may also append the Responder facade to the aliases key:

Usage

Using Facade

Optionally, you may use the Responder facade to create responses:

return Responder::success($users);

Including Data

return Responder::with('blog')->success($users);
return Responder::with('blog', 'blog.comment')->success($users);

Credit

  1. Fractal
  2. Laravel Responder

Related Packages

eventhomes/laravel-apicontroller

Simplified API controller, inspired by Jeffrey Way. Compatible with Laravel 5+ a...

94,247 8
eventhomes/laravel-fractalhelper

Compatible with Laravel 5+ and Lumen 5+.

88,761 7
cyvelnet/laravel5-fractal

A simple fractal service provider and transformer generator with model attribute...

189,204 79
spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

16,258,475 1,909
flugger/laravel-responder

A Laravel Fractal package for building API responses, giving you the power of Fr...

1,600,377 889