PHPackages                             codingphase/fractalfy - 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. codingphase/fractalfy

ActiveLibrary[API Development](/categories/api)

codingphase/fractalfy
=====================

Laravel wrapper for Fractal.

v2.0.9(4y ago)14.4kMITPHP

Since Feb 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/CodingPhase/fractalfy)[ Packagist](https://packagist.org/packages/codingphase/fractalfy)[ RSS](/packages/codingphase-fractalfy/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (18)Used By (0)

Fractalfy
=========

[](#fractalfy)

Laravel Wrapper for Fractal

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require codingphase/fractalfy

```

### Step 2: Register Service Provider

[](#step-2-register-service-provider)

Add your new provider to the `providers` array of `config/app.php`:

```
  'providers' => [
      // ...
      CodingPhase\Fractalfy\FractalfyServiceProvider::class,
      // ...
  ],
```

Fractal methods
---------------

[](#fractal-methods)

Extend your controller with FractalfyController

```
class DashboardController extends FractalfyController
{
    ...
}
```

Return collection

```
$users = Users::all();
return $this->fractal
    ->collection($users, new UserTransformer)
    ->get();
```

Return resource with pagination

```
$users = Users::all();
return $this->fractal
    ->paginate($users, new UserTransformer)
    ->get();
```

Fractalfy Helpers
-----------------

[](#fractalfy-helpers)

Use Fractalfy Helpers (already included in FractalfyController)

Popular

```
return $this->respondOK();
return $this->respondNotFound();
return $this->respondUnauthorized();
return $this->respondUnprocessable();
return $this->respondBadRequest();
return $this->respondWithSuccess(200); //any success code
return $this->respondWithError(400); //any success code
```

Other

```
return $this->respondOK($message); //pass message to respond
return $this->setMessage($message)->respondOK();
return $this->setMessage($message)->setStatusCode($statuscode)->respondWithSuccess();
return $this->setMessage($message)->setStatusCode($statuscode)->respondWithError();
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~112 days

Recently: every ~278 days

Total

17

Last Release

1618d ago

Major Versions

v1.0.7 → v2.0.02018-12-05

PHP version history (2 changes)v1.0.0PHP &gt;=5.5.9

v2.0.0PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/585fea021c5d2840a3a843dd8bf6cc67942d0224c37acb3044de346eed3a18fc?d=identicon)[Hesto](/maintainers/Hesto)

---

Top Contributors

[![Hesto](https://avatars.githubusercontent.com/u/13649507?v=4)](https://github.com/Hesto "Hesto (6 commits)")

---

Tags

apilaravelfractal

### Embed Badge

![Health badge](/badges/codingphase-fractalfy/health.svg)

```
[![Health](https://phpackages.com/badges/codingphase-fractalfy/health.svg)](https://phpackages.com/packages/codingphase-fractalfy)
```

###  Alternatives

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k16.0M115](/packages/spatie-laravel-fractal)[flugger/laravel-responder

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

8911.6M5](/packages/flugger-laravel-responder)[yajra/laravel-datatables-fractal

Laravel DataTables Fractal Plugin.

977.5M29](/packages/yajra-laravel-datatables-fractal)[cyvelnet/laravel5-fractal

A simple fractal service provider and transformer generator with model attributes for laravel &gt;=5.

79188.9k1](/packages/cyvelnet-laravel5-fractal)

PHPackages © 2026

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