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

mitulgolakiya/laravel-api-generator

Laravel API Generator scaffolds complete RESTful APIs from your database tables: controllers, models, routes, requests, resources, and docs, with pagination, filtering, sorting, and relationship support built in.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a dev-time artisan code generator, not a runtime dependency. It introspects the database via information_schema, then writes Eloquent models, resource controllers, form requests, routes, and API resources into app/ following PSR-4 and Laravel naming conventions. Architecturally this is the right shape for a Laravel codebase — artifacts are ordinary framework classes a developer could have hand-written, so there is no runtime coupling or vendor lock-in on the generated output. The friction is philosophical: it treats the live schema as the source of truth, which is the inverse of the migration-first discipline most Laravel teams adopt. That makes it a good fit for legacy/DB-first estates and a poor fit for greenfield teams.

Integration feasibility — this is the gating issue. Last release 2015-05-23, repository archived, and the composer.json constraints will almost certainly fail resolution against PHP 8.x / Laravel 9–12. Concrete blockers to verify: illuminate/support ^5.0 pinning, string-based controller/route namespaces, absence of return types and typed properties, deprecated $dates casts, and generated Route::resource rather than Route::apiResource. Composer will refuse to install; --ignore-platform-reqs would only convert an install failure into a runtime failure.

Description accuracy risk. The advertised capability set does not match the release date. API Resources shipped in Laravel 5.5 (August 2017), roughly two years after v1.3.3 — so the description is likely a later README revision or aspirational copy. Treat every bullet (relationships, soft deletes, pagination, configurable namespaces) as unverified until diffed against the actual source. The 9.32 score should be read as opportunity (the problem is real and high-value), not artifact quality.

Technical risk summary.

  • Unmaintained: no security patches, no compatibility work, no issue triage. Any CVE in transitive dev dependencies is yours.
  • Generative blast radius: the tool writes files. Default behavior on collisions, and whether it overwrites without confirmation, is unknown and must be tested in a scratch repo.
  • Inference quality: relationship and validation generation is only as good as the schema's FK constraints and column comments. Schemas without explicit FKs will yield models with missing relationships; validation rules will tend toward permissive nullable|string.
  • Security gap: generators of this era typically do not emit authorization policies or form-request authorize() logic beyond a stub returning true. That is a latent IDOR surface in anything shipped without review.
  • Credential scope: schema introspection needs a DB user with read access to information_schema — a broader grant than a typical app runtime user.

Key questions for the team.

  1. What is the actual objective — adopt this package, or reduce boilerplate on a specific backlog of tables?
  2. Which Laravel version is the target, and is a fork acceptable? (MIT license permits vendoring and relicensing in-house.)
  3. Is DB-first scaffolding tolerable, or is migration-first a hard constraint?
  4. Who owns the fork, and what is the review gate on generated code before merge?
  5. How many tables are in scope — 5, or 300? The economics invert past roughly 50 tables.

Integration Approach

Stack fit. Good for a Laravel 5.x monolith or a throwaway bootstrap environment; poor for Laravel 10–12, Octane/Swoole workloads, or API-first teams already contract-driven via OpenAPI. If the estate is modern Laravel, this package is a reference design, not a dependency.

Recommended migration path — do not add it to composer.json. Instead:

  1. Stand up a disposable Laravel 5.x container with a schema dump (or anonymized replica) and run the generator there, offline, as a one-shot artifact producer.
  2. Copy the emitted files into the modern application on a branch and modernize mechanically: typed properties, Route::apiResource, $casts array, laravel/pint, constructor promotion, and — critically — author policies and tighten validation by hand.
  3. Only if the output quality justifies it, fork the generator into an internal namespace (tools/api-generator) and update the stubs rather than the engine. The stubs are where nearly all the value and nearly all the maintenance live.

Preferable alternative worth pricing in parallel: rebuild the thin slice on supported rails — doctrine/dbal for schema introspection, and php artisan make:model --all / make:controller --api / make:request / make:resource invoked programmatically from a small custom command. This trades a 2015 codebase for ~300 lines you own, on a supported Laravel version. For most teams this is the better TCO within one sprint.

Compatibility and sequencing.

  1. Spike (1–2 days): run against 2–3 representative tables in an isolated branch. Score output on relationship correctness, validation quality, route collisions, and overwrite behavior. This single step resolves most of the open risk.
  2. Decision gate: adopt-as-fork vs. build-custom vs. abandon. Bring the spike diff to that decision — real generated code beats README claims.
  3. Pilot (1 sprint): one bounded module, hand-reviewed, with a documented "generated code is a draft, never merged unreviewed" rule.
  4. Generalize: if piloted, template the command for the team and pair it with a schema-convention doc (explicit FKs, enum handling, comments driving validation).
  5. Sunset plan: from day one, define the exit — the generated files are plain Laravel classes, so exit cost is zero. Keep it that way; never let generated output depend on the package at runtime.

Operational Impact

Maintenance. Upstream maintenance is zero by definition — archived since 2015. Whatever is adopted becomes internal IP. The engine is small enough to be tractable, but every hour goes to stubs, compatibility shims, and re-review of generated output, not features. Budget an explicit maintenance owner or do not fork.

Support. No community, no issue tracker, no CVE feed, no upgrade path. Runbooks and internal documentation must be written from source reading, not from upstream docs. The documentation that exists is dated and, per the release-date mismatch above, partly unreliable.

Scaling. Two distinct axes, with different answers:

  • Runtime scaling: unaffected. Generated controllers are ordinary Laravel; paginate() performance depends on your indexes, not the generator. No new runtime surface, no middleware, no service provider in production.
  • Organizational scaling: this is where it bites. At 200+ tables the output becomes 1,000+ files in a single PR, which no reviewer can meaningfully audit. Above a few dozen tables, generation must be batched, module-scoped, and gated, or the review bottleneck erases the time savings the tool promises.

Failure modes to instrument for.

  • Silent overwrite of hand-edited controllers and models — test first, and never run against a dirty working tree.
  • Wrong or missing relationship inference on schemas lacking declared foreign keys; produces plausible-looking but incorrect belongsTo/hasMany graphs.
  • Type-mapping errors on json, enum, uuid, unsignedBigInteger, and nullable columns — cascades into broken validation and casts.
  • Route collisions when generating many resources at once, or when existing handwritten routes overlap the generated prefix.
  • Missing authorization — generated CRUD endpoints exposed without policies is the highest-severity realistic failure.
  • Over-broad DB grants used for introspection leaking into deployment configuration.

Ramp-up. Low to run — one command, minutes to first output. Medium to trust — developers need enough Laravel fluency to review models, requests, and authorization before anything ships, and enough schema knowledge to spot bad inference. Medium to own if forked, since PHP 5-era idioms and 2015 Laravel internals will be unfamiliar to most current engineers. Plan for a half-day enablement session and a written review checklist; the checklist matters more than the tooling.

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