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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky