Weave 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.
andydefer/laravel-notification
adachsoft/cli-process-tester
jhaskell13/laraflow
sebastienheyd/boilerplate-media-manager
ccast/tagixo-primix
pretendtrue/laravel-builder
sawmainek/laravel-scout-tntsearch-driver
tomshaw/laravel-calendar-table
dibakar/laravel-ownership
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc