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

Eloquent Model Generator Laravel Package

rjacobsen/eloquent-model-generator

Generate Eloquent models directly from your database schema. This Laravel package inspects existing tables and scaffolds model classes with fillable fields and column metadata, cutting boilerplate when working with legacy or evolving databases.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Replatform / migration estimation. The package is a fast way to quantify how much of a legacy database schema can be scaffolded automatically versus hand-written. Running it against a real schema gives you a concrete model count, relationship surface, and naming-mismatch list — the raw inputs for a migration scope estimate and sprint plan.
  • Source-of-truth decision (database-first vs. migration-first). Adopting this tool encodes "the database is canonical, models are derived." That is a product/architecture decision, not just a dev convenience: it shapes how schema changes ship, how environments stay in sync, and how multi-tenant variations are handled. Use the tool as a forcing function to make that call explicitly rather than defaulting into it.
  • Build vs. buy vs. vendor. With no stars and no dependents, this is not a "buy" — it is a disposable internal accelerator. The decision this informs is whether to (a) vendor a one-off script for a single migration, (b) build a small in-house generator, or (c) adopt a maintained community package. For a one-time bootstrap, vendoring wins; for anything recurring, it does not.
  • Time-to-first-demo for database-first products. When a product is being wrapped around an existing schema (internal admin tooling, CRUD APIs, reporting surfaces), generated models collapse the first slice of work from days into hours, which is often the difference between a viable spike and a stalled one.
  • Roadmap sequencing for legacy modernization. If models can be generated in an afternoon, the critical path shifts from scaffolding to the harder work — domain logic, data quality, and behavior parity. That reprioritizes where the team should spend its early sprints.

When to Consider This Package

  • A one-time bootstrap or spike over an existing MySQL schema, run in a sandbox, with output treated as throwaway scaffolding.
  • The codebase is genuinely on Laravel 5.x and will stay there for the life of the effort (i.e., you are extracting value from a legacy app, not modernizing it yet).
  • The schema is small and conventional: single-column integer keys, standard pivot tables, no polymorphic relations, no JSON columns, no enums, no custom casts, no multi-schema or tenant-prefixed tables.
  • You need a fast estimate, not a maintained dependency — the tool is consumed once and discarded.
  • The team has budgeted for hand review of every generated file: relations, $fillable/$guarded, casts, table naming, and timestamps will need correction.

Look elsewhere when:

  • The target is Laravel 8/9/10/11. The package explicitly targets Laravel 5, which is end-of-life — no security patching, no framework compatibility, no support.
  • Zero stars and zero dependents is the entire adoption signal. That means no maintenance guarantee, no issue triage, no CVE response, and no one to call. Treat it as untrusted code: read it before running it, and never add it to a production composer.json.
  • You need recurring, CI-driven generation. Use a maintained alternative (e.g., reliese/laravel) or a small in-house script over doctrine/dbal/schema:dump introspection that you own.
  • The schema is complex: composite or non-integer keys, polymorphic relations, soft deletes, observers/events, policies, or custom casts. Generation will produce plausible-looking models that are subtly wrong — the most expensive kind of wrong.
  • You need the reverse direction (migrations from an existing database) or a full SBOM/compliance posture for dependencies.
  • You actually want domain modeling. Auto-generated models mirror tables, not bounded contexts; if the product's value depends on a rich domain layer, generation creates rework.

How to Pitch It (Stakeholders)

For executives: This is not a strategic dependency — it is a disposable accelerator we can use to de-risk and size a legacy replatform. For roughly half an engineer-day, we get a concrete inventory of how much model scaffolding is automatable, which sharpens the estimate for the migration roadmap before we commit headcount. The cost is bounded and the risk is contained by running it in a sandbox and discarding the output. Recommendation: fund a timeboxed spike, not adoption.

For engineering: Read-only schema introspection that emits Eloquent model stubs. Expect to fix relations, fillable/guarded, casts, and naming; expect no soft deletes, observers, policies, or domain behavior. Treat output as a starting diff, not a commit. The package targets Laravel 5 and has no adoption footprint, so it does not go in composer.json — vendor or fork it for the duration of the effort, or write a ~200-line in-house generator we control. If we need this on an ongoing basis, we evaluate a maintained alternative instead.

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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel