2017 © Pedro Peláez
 

library optimus-prime

A simple package to transform collection and entities to output to a JSON / API.

image

mosaiqo/optimus-prime

A simple package to transform collection and entities to output to a JSON / API.

  • Friday, July 3, 2015
  • by boudydegeer
  • Repository
  • 3 Watchers
  • 1 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 23 Versions
  • 0 % Grown

The README.md

Mosaiqo Optimus Prime

Is a simple package to transform collection and entities TO a JSON - API before the response is returned to the requester. Think of it like the view presenter so you can adjust your output before, and maintain a clean API even if you change the DDBB structure., (*1)

Optimus Prime, (*2)

## Instalation

To install Mosaiqo Optimus Prime is really simple just install it with composer:, (*3)

    composer require mosaiqo/optimus-prime "dev-master"

after it just put this line in your laravel app/config.php file :, (*4)

    'Mosaiqo\OptimusPrime\TransformerServiceProvider',

now you can begin to play with your transformers., (*5)

## How to transform your API

It's really easy to use Optimus Prime transformer.
In the model you want to use a transformer just have to implement the Mosaiqo\OptimusPrime\Decepticonsinterface. this interface forces you to use some methods to determine the transformer class.
But we have made it easy for you just pull in the Mosaiqo\OptimusPrime\Transformable trait we have created., (*6)


<?php namespace Foo\Bar; use Illuminate\Database\Eloquent\Model; use Mosaiqo\OptimusPrime\Contracts\Decepticons; use Mosaiqo\OptimusPrime\Transformable; class Foo extends Model implements Decepticons { use Transformable; }

The Versions

03/07 2015

dev-master

9999999-dev

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/07 2015

3.1.0

3.1.0.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/07 2015

dev-develop

dev-develop

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/07 2015

3.0.4

3.0.4.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/05 2015

2.0.3

2.0.3.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/05 2015

2.0.4

2.0.4.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/05 2015

3.0.0

3.0.0.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/05 2015

3.0.1

3.0.1.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/05 2015

3.0.2

3.0.2.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

2.0.2

2.0.2.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

dev-hotfix/2.0.2

dev-hotfix/2.0.2

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

2.0.1

2.0.1.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

dev-hotfix/2.0.1

dev-hotfix/2.0.1

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

2.0.0

2.0.0.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/05 2015

dev-release/2.0.0

dev-release/2.0.0

A simple package to transform collection and entities to output to a JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

16/09 2014

1.7.0

1.7.0.0

A simple package to transform collection and entities to an JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

16/09 2014

1.5.0

1.5.0.0

A simple package to transform collection and entities to an JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

16/09 2014

1.6.0

1.6.0.0

A simple package to transform collection and entities to an JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/09 2014

1.4.0

1.4.0.0

A simple package to transform collection and entities to an JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

03/09 2014

1.3.0

1.3.0.0

A simple package to transform collection and entities to an JSON / API.

  Sources   Download

The Requires

 

The Development Requires

by Boudy de Geer

02/09 2014

1.1.0

1.1.0.0

  Sources   Download

The Requires

 

by Boudy de Geer

02/09 2014

1.2.0

1.2.0.0

  Sources   Download

The Requires

 

by Boudy de Geer

02/09 2014

1.0.0

1.0.0.0

  Sources   Download

The Requires

 

by Boudy de Geer