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 Api Laravel Package

dskripchenko/laravel-api

Laravel package for rapidly building REST APIs with automatic routing, request validation, filtering, pagination, and consistent JSON responses—plus OpenAPI docs generation to keep your endpoints documented as they grow.

Deep Wiki
Context7

Technical Evaluation

What it is. dskripchenko/laravel-api bundles three capabilities into one opinionated package: (1) versioned API routing, (2) OpenAPI 3.0 document generation driven directly from PHPDoc — explicitly avoiding annotation classes and hand-maintained YAML — and (3) CRUD scaffolding plus "middleware cascades" for stacking middleware per route/version. The differentiated thesis is the doc generation: annotation-based tooling (zircote/swagger-php + L5-Swagger) is verbose and pollutes controllers, while hand-written YAML drifts. PHPDoc-as-source-of-truth is the same bet dedoc/scramble makes, so this package is entering a space with at least one credible, better-known alternative.

Architecture fit. The package follows conventional Laravel package shape — service provider, publishable config, artisan commands — so it slots into the framework's idioms rather than fighting them. Treating API versioning as a first-class routing concept (version prefix + per-version documentation) is genuinely useful for teams running v1/v2 concurrently, a scenario most doc tools handle poorly. The CRUD scaffolding is dev-time codegen and carries no production runtime footprint. The middleware cascade abstraction is the piece most likely to become a "framework on top of a framework": convenient, but it hides Laravel's native middleware ordering from developers who will debug it at 2 a.m.

Integration feasibility. Install is a one-line Composer require, so the cost of evaluation is low. The real feasibility question is inference quality: mapping PHP type declarations, Eloquent relationships, and FormRequest validation rules into accurate OpenAPI schemas is where PHPDoc-driven generators either succeed or produce documentation that is confidently wrong. That cannot be judged from the README — it requires a spike against a representative controller. Secondary checks: route:cache and config:cache compatibility, Laravel Octane behavior, and whether doc generation runs at build time (preferred) or request time.

Technical risk. High, and mostly non-technical in origin. Thirteen stars, a score of ~19/100, and a repository field of "unknown" mean there is no community validation, no visible issue history to gauge responsiveness, and no ability to complete supply-chain due diligence from the provided metadata. The listed last release of 2026-10-01 is either a future-dated artifact or a data-quality problem — either way, provenance must be confirmed before this enters a dependency graph. The effective bus factor is one. Adopting this is a bet on a maintainer, not on a project.

Key questions for the maintainer/spike:

  • Which Laravel and PHP versions are supported and tested in CI?
  • Does schema inference read FormRequest::rules() and Eloquent casts/relations, or only raw PHPDoc?
  • Is OpenAPI generated via artisan command (build-time artifact) or at runtime?
  • Does it coexist with, or conflict with, existing L5-Swagger/Scramble installs?
  • How are auth schemes, pagination envelopes, and error responses expressed without annotations?
  • Is there a documented upgrade/deprecation policy, and are there tests?
  • What is the actual canonical repository URL, and is the release signed/tagged?

Integration Approach

Stack fit. Best suited to a Laravel 10/11 + PHP 8.1+ codebase that already exposes a versioned JSON API and lacks documentation, or whose documentation has drifted. Teams with heavy annotation investment or an established Scramble setup get less value and more conflict surface. If the platform is Laravel-adjacent (Lumen, or Laravel with a separate gateway), confirm the routing assumptions hold.

Migration path. Incremental and reversible — this is the package's strongest practical attribute. Nothing forces a big-bang conversion: install, point it at a single versioned route group, generate docs, and diff the output against the current contract by hand or with a spec-comparison tool. If output quality is unacceptable, uninstall and lose a day. If acceptable, expand version group by version group. For teams on annotations, the migration is per-endpoint rewriting to PHPDoc conventions rather than a mechanical transform; budget accordingly, and run both generators in parallel during transition so the published spec never regresses.

Compatibility. Verify three things explicitly before committing: (1) that middleware cascade ordering composes predictably with existing global and route middleware; (2) that route caching and config caching still work in the deploy pipeline; (3) that generated specs do not collide with any existing /docs or /api-docs endpoint or Swagger UI route. Also confirm behavior under Octane if the target services use it — static state in a doc generator is a classic source of cross-request leakage.

Sequencing.

  1. Time-boxed spike (2–3 days) on one representative controller with real validation rules and relationships.
  2. Static-analysis enforcement — PHPStan or PHPCS rules requiring typed params, return types, and docblocks — because the entire documentation contract now depends on docblock discipline. Without this, docs rot faster than YAML would.
  3. CI gate: regenerate spec on every build and fail on invalid OpenAPI or on a diff that wasn't reviewed.
  4. Pilot one version group in a non-critical service.
  5. Expand only after the pilot survives a full release cycle.

Recommendation. Treat as a tactical, well-scoped experiment, not a strategic dependency. Proceed only if the spike shows strong inference from validation rules and Eloquent models; otherwise default to Scramble for the same "no annotations" benefit with materially better community support.

Operational Impact

Maintenance. The dominant cost is documentation discipline, not the package itself. Once PHPDoc is the source of truth, every controller change carries an implicit spec change, and skipping a docblock becomes a silent contract regression. Enforce with static analysis and a CI spec diff. On the dependency side, pin the exact version, mirror the repository internally, and review the diff of every upgrade — at 13 stars there is no crowd to absorb a bad release.

Support. Community-only, no commercial backing, minimal visible issue history. Assume no external support and assign an internal owner (one backend engineer, named) who is accountable for upgrades and for arbitrating spec-vs-code disputes. Budget a fallback: if the maintainer goes dormant, the escape hatch is forking the generator or migrating to Scramble — both are days of work, not weeks, which keeps the risk bounded.

Scaling. Runtime cost should be nil if specs are generated at build time and served statically; confirm this, because request-time generation would put reflection and docblock parsing on the hot path. The team-level scaling limit is more relevant: as the number of controllers and API versions grows, the generator's inference and merge behavior gets stressed, and one maintainer's throughput becomes the ceiling on how fast the org can adopt new PHP features the package doesn't recognize.

Failure modes to watch.

  • Silent spec drift when a docblock is stale — docs describe intent, not behavior.
  • Inference gaps on complex types (unions, generics, nested resources) producing schema that is plausible but wrong, which is worse than no docs.
  • Middleware cascade misordering causing auth or throttling to be applied to the wrong version group.
  • route:cache failure surfacing only in production deploys, not locally.
  • Breaking change shipped in a minor version with no changelog, given the release-signal gaps already noted.
  • Over-exposure: internal or admin endpoints unintentionally included in the published spec.
  • Supply chain: unverifiable provenance ("repository: unknown") and an anomalous release date.

Ramp-up. Low to moderate. Any Laravel developer installs and runs it in under an hour; the real learning curve is the package's PHPDoc dialect — what it recognizes, what it ignores, and how to express responses, enums, and errors without annotations. That knowledge will live with one or two people unless it is written down. Produce a short internal style guide and a reference controller before onboarding the wider team, and expect the first version groups to take noticeably longer than later ones.

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