Skip to content
This repository has been archived by the owner on Oct 6, 2022. It is now read-only.

metricloop/laravel-transformer-maker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A quick way to create Fractal Transformers

Latest Version Software License Build Status Total Downloads

This package gives you a quick way to create Transformers for your Eloquent models when using Fractal.

Installation And Usage

Issue the command:

composer require "metricloop/laravel-transformer-maker"

Then register the service provider:

// config/app.php

'providers' => [
    // ...
    MetricLoop\TransformerMaker\TransformerMakerServiceProvider::class,
];

Then just use it like any other Artisan make command:

php artisan make:transformer Person

And get the stubbed out PersonTransformer.php in App/Transformers!

Shout Out

To Phil Sturgeon and the team at the PHP League for Fractal. And if you haven't already, go check out Phil's book about building APIs: Build APIs You Won't Hate.

About Metric Loop

Metric Loop is an Austin based technology company that strives to create value by helping its clients reduce overhead, simplify their hardware procurement, and run their businesses more efficiently.

License

The MIT License (MIT). Please see License File for more information.