purwandi/responder

Transform your laravel eloquent model using fluent fractal API

Installs: 80

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/purwandi/responder

dev-master 2016-08-23 01:34 UTC

This package is not auto-updated.

Last update: 2025-10-23 08:11:20 UTC


README

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