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.
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.
nullable|string.authorize() logic beyond a stub returning true. That is a latent IDOR surface in anything shipped without review.information_schema — a broader grant than a typical app runtime user.Key questions for the team.
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:
Route::apiResource, $casts array, laravel/pint, constructor promotion, and — critically — author policies and tighten validation by hand.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.
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:
paginate() performance depends on your indexes, not the generator. No new runtime surface, no middleware, no service provider in production.Failure modes to instrument for.
belongsTo/hasMany graphs.json, enum, uuid, unsignedBigInteger, and nullable columns — cascades into broken validation and casts.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.
How can I help you explore Laravel packages today?