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

Laravel Fractal Laravel Package

gathercontent/laravel-fractal

A Laravel wrapper for the Fractal library that helps you transform Eloquent models, collections, and paginators into clean API responses with support for includes, serializers, and flexible resource transformations.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API response consistency: supports a reusable transformation/presentation layer for endpoints, so product requirements for payload shape, embedded resources, pagination metadata, and versioned outputs can be standardized rather than reinvented per feature.
  • Roadmap sequencing: useful when the roadmap includes public APIs, mobile backends, partner integrations, or service-to-service contracts that need predictable JSON output across teams.
  • Build vs. buy: adopting this package is a tactical “integrate open source” decision versus building a custom Laravel service provider around Fractal. It is not a strategic platform choice; it reduces glue code but does not remove the need to own API contract design.
  • Feature delivery: lets teams ship resource transformations faster with Laravel auto-discovery/config while keeping Fractal transformers as the place where product-facing response rules live.
  • Use-case fit: best for Laravel apps already using or committing to Fractal for transformers, includes, serializers, and pagination/meta patterns.
  • Risk decision: with modest adoption (about 50 stars) and a low package score, treat it as a small, replaceable dependency. Require compatibility checks, version pinning, contract tests, and an internal wrapper so it can be swapped later.

When to Consider This Package

  • Consider it when the product is a Laravel/PHP application, the team has decided to use Fractal, and the remaining problem is Laravel integration: service provider registration, configuration, and dependency injection.
  • Consider it when API response consistency is becoming a product risk—multiple endpoints or teams are producing inconsistent JSON, and Fractal transformers would give product and engineering a shared contract artifact.
  • Consider it when the team accepts ownership of a small open-source dependency and can verify Laravel/PHP version compatibility, maintenance activity, and upgrade path.
  • Consider it when the alternative is custom boilerplate around Fractal; this package may reduce setup and keep the integration conventional.
  • Look elsewhere when Laravel’s native Eloquent API Resources are sufficient, when Fractal is not already a team standard, or when the product needs a maintained, well-supported API serialization layer with broad community adoption.
  • Look elsewhere when requirements include vendor support/SLA, non-Laravel services, GraphQL, JSON:API-specific semantics, OpenAPI-first code generation, or performance-critical nested payloads without profiling.
  • Look elsewhere if the organization cannot tolerate low-adoption OSS dependencies or if the package becomes a critical-path dependency without a documented fork/replacement plan.

How to Pitch It (Stakeholders)

  • Executive summary: this package can accelerate delivery of consistent API responses in a Laravel product by standardizing how resources are transformed for web, mobile, and partner consumers. It is a small tactical dependency, not a strategic platform bet. Validate compatibility, pin the version, and keep an exit path.
  • Engineering summary: it is a thin Laravel service provider for Fractal. Use it to register/configure Fractal and centralize transformers, includes, serializers, and pagination/meta output. Wrap it behind an internal API-response abstraction, add contract tests, and avoid leaking package-specific assumptions into domain code.
  • Product framing: require an explicit API contract per consumer and acceptance criteria for response shape, pagination, and versioning. Use Fractal transformers as the implementation of that contract, but do not let the package dictate product behavior.
  • Risk framing: modest GitHub adoption means low ecosystem signal. Approve as a time-boxed spike or tactical dependency if it removes real boilerplate; reject if native Laravel API Resources or a more actively adopted integration satisfies the need with less long-term ownership.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource