PHPackages                             pixelfusion/api-serializer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. pixelfusion/api-serializer

AbandonedArchivedLibrary[API Development](/categories/api)

pixelfusion/api-serializer
==========================

Custom Fractal serializer for our preferred API output.

1.1.2(9y ago)03.8kMITPHP

Since Aug 17Pushed 6y agoCompare

[ Source](https://github.com/pixelfusion/api-serializer)[ Packagist](https://packagist.org/packages/pixelfusion/api-serializer)[ RSS](/packages/pixelfusion-api-serializer/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (6)Used By (0)

Pixel Fusion API Serializer
===========================

[](#pixel-fusion-api-serializer)

[![NZ](https://camo.githubusercontent.com/6d52d00a8b7cf0d669ae7a8fac596b33477fcd63507986ce69ebdb4ccdca8a41/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6d616465253230696e2d6e7a2d626c75652e7376673f7374796c653d666c61742d737175617265)](http://pixelfusion.co.nz)[![Love](https://camo.githubusercontent.com/bd230c4e97e9756959cb2d89a76eca046b0227eef21e2051f08414f49ff8d931/687474703a2f2f696d672e736869656c64732e696f2f62616467652f6275696c74253230776974682d6c6f76652d7265642e7376673f7374796c653d666c61742d737175617265)](http://pixelfusion.co.nz)[![Awesomeness](https://camo.githubusercontent.com/06e1fddb4a581001edc2ea7de3c8ccfe3688107572d87740577433b2f39f1ae3/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617765736f6d652d3130302532352d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](http://pixelfusion.co.nz)

This package provides a custom Serializer for [Fractal](http://fractal.thephpleague.com) that transforms data into the API output that we at [Pixel Fusion](https://pixelfusion.co.nz) prefer.

Installation
------------

[](#installation)

To install the latest version of this package run the following command:

```
composer require pixelfusion/api-serializer

```

After that you should change the serializer that you want to use to `PixelFusion\Fractal\Serializer\ApiSerializer`.

Output format
-------------

[](#output-format)

This API serializer extends the default ArraySerializer but has a slight difference. For the pagination we omitted the fields that we don't use. Below is an example of how a response that includes pagination will look like:

```
{
  "data": [
    {
      "id": "7ywpxp6r",
      "title": "The Godfather",
    },
    {
      "id": "q9pykp17",
      "title": "Pulp Fiction",
    }
  ],
  "pagination": {
    "total": 9,
    "per_page": 2,
    "current_page": 1,
    "last_page": 5
  }
}
```

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 54.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~69 days

Total

5

Last Release

3328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6a363b2d85dc3e82e73cc9e3a57fc15132920b166c5938ad63a54029b9f94b9?d=identicon)[tractorcow](/maintainers/tractorcow)

---

Top Contributors

[![kielabokkie](https://avatars.githubusercontent.com/u/1221750?v=4)](https://github.com/kielabokkie "kielabokkie (6 commits)")[![damian-pf](https://avatars.githubusercontent.com/u/13355851?v=4)](https://github.com/damian-pf "damian-pf (5 commits)")

---

Tags

jsonapiserializerfractal

### Embed Badge

![Health badge](/badges/pixelfusion-api-serializer/health.svg)

```
[![Health](https://phpackages.com/badges/pixelfusion-api-serializer/health.svg)](https://phpackages.com/packages/pixelfusion-api-serializer)
```

###  Alternatives

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k16.0M114](/packages/spatie-laravel-fractal)[ellipsesynergie/api-response

Simple package to handle response properly in your API

3771.4M21](/packages/ellipsesynergie-api-response)[yajra/laravel-datatables-fractal

Laravel DataTables Fractal Plugin.

977.5M29](/packages/yajra-laravel-datatables-fractal)[craftcms/element-api

Create a JSON API for your elements in Craft

502710.4k9](/packages/craftcms-element-api)[nilportugues/laravel5-json-api

Laravel 5 JSON API Transformer Package

31032.5k1](/packages/nilportugues-laravel5-json-api)[nilportugues/jsonapi-bundle

Symfony 2 &amp; 3 JSON API Transformer Package

11446.4k](/packages/nilportugues-jsonapi-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
