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

Api Laravel Package

laravie/api

A Laravel package for structuring JSON APIs with a lightweight, organized approach to endpoints and responses. Laravie API helps keep API code clean and consistent inside Laravel applications, making backend services easier to build and maintain.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • API response contract standardization: This package is a decision lever for "what does every JSON response from our service look like?" — success envelope, error envelope, HTTP status mapping. Adopting it encodes that contract as code rather than as a wiki page nobody reads.
  • Build vs. buy (really: build vs. borrow): The package is a thin helper layer of a few hundred lines. The PM decision is not "buy vs. build" but "adopt a convention vs. formalize our own." Because the scope is small, the honest comparison is ~1–2 engineer-days to replicate internally against near-zero integration cost plus long-term dependency risk.
  • Consistency across squads: Useful framing for orgs where multiple Laravel services each hand-roll response()->json(['data' => ..., 'errors' => ...]). A shared helper reduces reviewer nitpicks and makes client SDKs and frontend error handling predictable.
  • Roadmap input for API platform work: Evaluating this surfaces the real requirements — error code taxonomy, i18n of messages, pagination metadata, request/trace IDs. Those requirements belong on the platform roadmap whether or not this package is chosen.
  • Use cases it fits: internal/back-office APIs, admin panels, MVP endpoints where speed matters more than a versioned public contract.
  • Use cases it does not drive: public/partner APIs, anything needing OpenAPI generation, hypermedia, or formal error-code registries.

When to Consider This Package

Consider it only when all of the following hold:

  • The project is internal or low-blast-radius; a breaking change in the response envelope would not break external consumers.
  • Your Laravel version is explicitly verified compatible. v5.0.0 (the first release since 2022-05-19) adds Laravel 9 support only — there is still no stated support for Laravel 10/11/12, and the changelog is a single commit. If you are on Laravel 10+, this package remains effectively unmaintained for your stack; confirm on a branch before committing, and treat the major-version bump as requiring the usual v4→v5 regression pass rather than as evidence of renewed stewardship.
  • You have no SLA requirement on dependency maintenance and are comfortable vendoring or forking if the maintainer goes quiet (14 stars, single-maintainer signal, one commit in roughly three years — still accurate after v5.0.0).
  • You want a convention, not a framework — you are not asking it to do content negotiation, validation-error mapping, or versioning for you.
  • The team is small enough that an internal coding standard would otherwise drift.

Look elsewhere (or build in-house) when:

  • You need active maintenance, security patch responsiveness, or a support contract — the release cadence and adoption signal here are weak. A single "add Laravel 9 support" commit after a three-year gap is a maintenance data point, not a reversal of the trend, and score 0.19 remains a proxy for "nobody is stress-testing this in production."
  • You are shipping a public or versioned API: you need an explicit, documented contract you own, not one implied by a third-party helper.
  • You need OpenAPI/Swagger output, RFC 7807 problem-details errors, error-code registries, or standardized pagination — this package's helpers are too thin to cover those, and you will end up wrapping the wrapper.
  • You are already on Laravel's native response()->json(), API Resources, and Handler::render() customization — most of the value here is already reachable with framework primitives plus one small base controller or trait.
  • You have strict dependency governance (SBOM, license review beyond BSD-3-Clause, reproducible builds, supported-framework-version policy) — a package whose newest release targets Laravel 9 will fail review on a modern stack anyway.

How to Pitch It (Stakeholders)

To executives: This is a small, low-cost convention library that makes our JSON APIs return consistent success and error shapes. The business value is reduced frontend rework and faster endpoint delivery — not new capability. The risk is maintenance: the project is a single-maintainer package that went roughly three years without a release, and the recent v5.0.0 adds only Laravel 9 support — no new capability, no support for current Laravel versions. I do not recommend making it a load-bearing dependency. My recommendation is to adopt the pattern — a small internal response helper plus a written envelope spec — which costs roughly one to two engineer-days, removes the dependency risk entirely, and gives us a contract we own and can version.

To engineering: The useful idea is a thin, shared response layer: typed success/error helpers, one place that maps exceptions to status codes, and controllers that stay focused on logic. We can get 90% of that with a base ApiController trait over response()->json() in well under a sprint. v5.0.0 is a major-version bump but the changelog contains a single change (Laravel 9 support), so there is no new feature to re-evaluate and no reason to expect the maintenance posture has changed. If you still want to trial it, do it on one internal service only if you are on Laravel 9, pin the version, run the v4→v5 upgrade on a branch, and isolate it behind our own helper interface so swapping it out later is a one-file change.

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.
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource