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

Laravel5 Fractal Laravel Package

cyvelnet/laravel5-fractal

Laravel 5 Fractal offers a simple Laravel-friendly wrapper around League Fractal for transforming Eloquent models and collections into clean API responses, with reusable transformers, includes, serializers, and pagination support.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API presentation-layer standardization: Supports a decision to use explicit transformers for JSON output instead of exposing Eloquent models directly, improving consistency and reducing accidental data leakage.
  • Build vs. buy for API plumbing: Replaces a small custom Laravel service provider and transformer generator with an MIT-licensed package. The buy/integrate decision is low-cost, but should be treated as tactical rather than strategic.
  • Roadmap for API consistency: Useful when planning work to standardize response shapes across web, mobile, partner, or internal APIs; transformers become the shared contract layer.
  • Use cases: REST/JSON APIs with nested relationships, conditional fields, includes, serializers, pagination, or evolving response contracts; internal/admin APIs where output discipline matters but GraphQL/OpenAPI tooling is not required.
  • Engineering workflow decision: The artisan transformer generator can speed scaffolding and enforce team conventions, reducing boilerplate and review friction.
  • Dependency-risk decision: With 79 stars, a low package score, and a last release in March 2024, adopt only after validating compatibility with the current Laravel/PHP version. It should not become a platform-level dependency without a fallback plan.

When to Consider This Package

Consider it when:

  • The product is on Laravel >=5 and the team has already chosen Fractal or a transformer/presenter pattern for API responses.
  • You need a lightweight integration: service provider binding plus transformer generation, not a full API framework.
  • The API surface is small-to-medium and would benefit from explicit, testable output transformations.
  • The team values convention over custom in-house glue and can accept a modest, low-maintenance dependency.
  • You can verify current Laravel/PHP compatibility and are comfortable with MIT licensing and community-level support.

Look elsewhere when:

  • The product is a greenfield Laravel app where Eloquent API Resources are sufficient; fewer dependencies is usually better.
  • You need active maintenance, large community support, frequent releases, or vendor-backed SLAs.
  • You require OpenAPI-first contracts, JSON:API, HAL, GraphQL, advanced API versioning, or gateway-level API management.
  • The team is not using Fractal and does not need generator-based scaffolding.
  • Procurement/security requires strong adoption signals; the low star count and package score may fail due diligence.
  • Compatibility with the current Laravel version cannot be confirmed quickly.

How to Pitch It (Stakeholders)

For executives: This is a small MIT-licensed integration that helps engineering standardize API responses and move faster on API-facing features. It is not customer-facing and carries limited direct cost, but it has modest adoption and should be piloted rather than treated as a strategic platform bet. Approve a time-boxed trial with a fallback to Laravel’s built-in API Resources if compatibility or maintenance becomes a concern.

For engineering leadership: The package provides a Fractal service provider and transformer generator for Laravel, reducing custom glue and encouraging explicit response transformations. It is useful if the team is already committed to Fractal or wants a disciplined transformer layer. Validate it against the current Laravel/PHP matrix, add contract tests around transformed responses, and document an exit path. If the app is modern Laravel and does not need Fractal-specific features, standard API Resources are likely the lower-risk default.

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.
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums
rlacerda83/query-parser
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings