An easy to use Fractal wrapper built for Laravel and Lumen applications
1.9k
Stars
184
Forks
0
Open issues
30
Contributors
AI Analysis
A Laravel and Lumen wrapper around the Fractal data transformation library that simplifies API response formatting. It provides a fluent interface and multiple syntax options for transforming collections and Eloquent models into structured API outputs. Best suited for Laravel developers building REST APIs who need declarative data transformation without boilerplate.
Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.
AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.
Laravel wrapper for Fractal that simplifies API data transformation with minimal boilerplate
laravel-fractal is a thin, opinionated wrapper around the League/Fractal library designed to reduce boilerplate when transforming API responses in Laravel and Lumen applications. It targets Laravel developers who need structured, re-usable data transformation without writing verbose Fractal setup code. Adoption appears concentrated within Laravel ecosystem projects, particularly those using Spatie's ecosystem.
Created in October 2015, laravel-fractal emerged as Fractal was gaining traction for API response standardization. It positions itself as the 'Laravel way' to use Fractal, following Laravel's philosophy of developer ergonomics and convention over configuration.
Star count has plateaued significantly — zero growth in the last 7 days and modest star count (1,910) relative to similar Laravel packages. This suggests the project has reached a stable equilibrium within its niche rather than experiencing active expansion. The package remains actively maintained (last push 2026-06-26) but does not appear to be gaining new users at scale.
Adoption not verified through public metrics. No case studies, testimonials, or documented large-scale deployments mentioned in README. Total Packagist downloads not quoted in provided metadata. Downloads badge present but count not extracted. Adoption likely exists within Spatie client base and Laravel ecosystem practitioners, but magnitude cannot be determined.
Based on README, the package provides a fluent interface wrapper and helper functions (fractal(), Facade) around League/Fractal's Manager and Resource classes. It appears to handle Laravel Collection integration, auto-includes/excludes parsing from request parameters, and configurable serializers. Exact implementation details cannot be verified from README alone.
Not documented in README. CI badge present (run-tests workflow) but specific coverage metrics not provided.
Repository shows recent activity (last push 26 June 2026, 11 days before evaluation date). Packagist badge and GitHub Actions present suggest active maintenance cadence. However, maintenance appears to be reactive (bug fixes, Laravel version compatibility) rather than feature-driven, which is appropriate for a mature wrapper library.
ADOPT IF: you are already using Fractal in Laravel projects and want to reduce boilerplate; your team values Spatie's ecosystem cohesion; you need request-driven include/exclude/fieldset parsing out of the box. AVOID IF: you are starting new API projects in 2026+ (consider spatie/laravel-data as Spatie's recommended approach for data transformation); you require actively growing community support or frequent feature releases; you are evaluating packages for greenfield projects where tooling decisions are not yet locked. MONITOR IF: you are maintaining a legacy Laravel codebase currently using laravel-fractal (remains stable; no urgent migration pressure); you are evaluating whether Spatie has positioned laravel-data as its successor (adoption signals unclear).
Independent dimensions
Mainstream potential
2/10
Technical importance
5/10
Adoption evidence
3/10
- Potential obsolescence: Spatie maintains laravel-data (1,770 stars) as a more modern alternative using DTOs, suggesting laravel-fractal may not be recommended for new Spatie-aligned projects.
- Fractal ecosystem dependency: Any breaking changes in League/Fractal would require matching adaptation; wrapper is vulnerable to upstream volatility.
- Narrow use case: Only applicable to API response transformation; does not solve other common Laravel API concerns, limiting total addressable adoption.
- Adoption plateau: Zero star growth in past 7 days and modest absolute count suggest the project has reached its market saturation within niche; unlikely to see inflection point.
- Declining Laravel API conventions: If Laravel ecosystem shifts toward alternative transformation patterns (e.g., DTOs, attribute-based serialization), laravel-fractal's relevance may decline further.
laravel-fractal will likely remain a stable, maintenance-mode package serving legacy codebases and developers with existing Fractal expertise. It is unlikely to gain significant new adoption; Spatie has signaled a direction shift toward laravel-data. The package will continue to receive compatibility updates for Laravel/Lumen LTS releases but should not be expected to evolve with new features.
Newsletter
Get analyses like this every Monday
Free weekly digest of the most interesting open-source discoveries.
Languages
Information
- Language
- PHP
- License
- MIT
- Last updated
- 2w ago
- Created
- 131mo ago
- Analyzed with
- anthropic/claude-haiku-4-5
Stars over time
Contributors over time
Top 100 contributors only — repos with more will plateau at 100.
Open issues
No open issues — clean slate.
Open pull requests
No open pull requests.
Top contributors
Recent releases
Similar repos
laravel/lumen-framework
Lumen is a micro-framework built on Laravel components, optimized for speed and...
spatie/package-skeleton-laravel
This is a template repository for scaffolding Laravel packages, not a...
| Repository | Stars | Week Δ | Language | Score | Updated |
|---|---|---|---|---|---|
|
|
1.9k | — | PHP | 8/10 | 2w ago |
|
|
1.8k | — | PHP | 8/10 | 2w ago |
|
|
1.5k | — | PHP | 8/10 | 2w ago |
|
|
2.4k | — | PHP | 8/10 | 2w ago |
|
|
1k | — | PHP | 8/10 | 2w ago |
|
|
1.9k | — | PHP | 8/10 | 5mo ago |
More recent Spatie offering (1,770 stars) that uses data transfer objects and attributes for type-safe transformation. Addresses similar domain but represents a different architectural philosophy — DTO-first vs. transformer-first. laravel-fractal may be considered legacy in favor of laravel-data for new Spatie projects.
Different domain (API authentication) but higher star count (2,969) indicates broader Laravel adoption. Not a direct competitor but represents the adoption level of more recent/central Laravel packages.
Developers can use League/Fractal directly in Laravel. laravel-fractal's value is syntactic convenience and convention defaults, not new capability. Switching cost is low, making adoption more about developer preference than lock-in.
Standalone JSON:API libraries may handle transformation + serialization in one step. laravel-fractal depends on Fractal for serialization logic, potentially adding indirection vs. unified solutions.
Parent library (framework-agnostic wrapper around Fractal) that laravel-fractal builds upon. laravel-fractal is the Laravel-specific adaptation; developers using Laravel gain Laravel integration but are not gaining new Fractal capabilities.
