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

ActiveLibrary[API Development](/categories/api)

hesto/fractalfy
===============

Laravel wrapper for Fractal.

v1.0.2(9y ago)01.6kMITPHPPHP &gt;=5.5.9

Since Jan 15Pushed 9y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (4)Used By (0)

Fractalfy
=========

[](#fractalfy)

Laravel Wrapper for Fractal

Usage
-----

[](#usage)

### Step 1: Install Through Composer

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

```
composer require hesto/fractalfy

```

### Step 2: Register Service Provider

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

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

```
  'providers' => [
      // ...
      Hesto\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

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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 ~14 days

Total

3

Last Release

3424d ago

### 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/hesto-fractalfy/health.svg)

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

###  Alternatives

[spatie/laravel-fractal

An easy to use Fractal integration for Laravel applications

1.9k15.7M113](/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.

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

Laravel DataTables Fractal Plugin.

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

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

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

PHPackages © 2026

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