Fractal
PHP library that transforms complex data into structured API output, with serializers for formats such as JSON-API.
fractal.thephpleague.com/repositorydocs
Fractal is a PHP library that turns the data an application holds into the output an API sends. Each resource passes through a transformer class, which sets the shape of the output in one place, so a change to the underlying data does not change what clients receive. A serializer then sets how the transformed data is structured, and the library ships serializers for a plain data array and for JSON-API. Collections can carry pagination information through adapters for Laravel’s pagination package, Pagerfanta, Laminas and others.
Identity
Rendering and deploy
- Install with
- composer, autoloader without Composer7
Releases
Adoption
Sources
- 2026-11-16: links
fractal.thephpleague.com/ - 2026-11-16: links, Written in, License, GitHub stars
api.github.com/repos/thephpleague/fractal - 2026-11-16: links, Categories, Runtime
github.com/thephpleague/fractal/blob/master/README.md - 2026-11-16: Maintainer, License model
github.com/thephpleague/fractal/blob/master/LICENSE - 2026-11-16: First release, Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/packagist.org/packages/league%2Ffractal - 2026-11-16: Minimum runtime
github.com/thephpleague/fractal/blob/0.21/composer.json - 2026-11-16: Install with
fractal.thephpleague.com/installation/ - 2026-11-16: Packagist downloads
packagist.org/packages/league/fractal.json - 2026-11-16: Current major version, Last release
github.com/thephpleague/fractal/releases/tag/0.21 - 2026-11-16: Contributors
api.github.com/repos/thephpleague/fractal/contributors?per_page=1