Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fractal Laravel Package

league/fractal

League Fractal is a transformation/presentation layer for API output (JSON/YAML). Define consistent serializers and transformers, type-cast fields, include related resources, and handle pagination—keeping response schemas stable as your data changes.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit: Fractal is a framework-agnostic transformation layer that integrates seamlessly with Laravel's API workflow. It complements Eloquent models by providing a dedicated view layer for JSON/YAML output, solving inconsistencies in raw json_encode() responses. Its design aligns with Laravel's separation of concerns, allowing clean decoupling of data sources from API responses without framework-specific dependencies.

Integration feasibility: High. Installation via Composer is straightforward, and Laravel-specific integrations exist (e.g., spatie/laravel-fractal). However, direct integration requires manual setup of transformers, serializers, and paginator adapters. While Laravel's built-in resources offer simpler use cases, Fractal excels for complex relationships, custom serialization (HAL/JSON-API), and sparse fieldsets where native resources fall short.

Technical risk: Low. The package is actively maintained (recent 0.21 release with PHP 8.1+

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
nasirkhan/laravel-sharekit
directorytree/privacy-filter-classifier
directorytree/privacy-filter
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata
splash/openapi
splash/scopes
splash/toolkit
testo/output-teamcity
testo/bridge-symfony