PHPackages                             adereksisusanto/laravel-generator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. adereksisusanto/laravel-generator

ActiveLibrary[Database &amp; ORM](/categories/database)

adereksisusanto/laravel-generator
=================================

Generate Laravel models, migrations, and seeders from existing database tables

v4.0.0(1mo ago)17MITPHPPHP ^8.3CI passing

Since Jul 10Pushed 1mo agoCompare

[ Source](https://github.com/adereksisusanto/laravel-generator)[ Packagist](https://packagist.org/packages/adereksisusanto/laravel-generator)[ GitHub Sponsors](https://github.com/adereksisusanto)[ RSS](/packages/adereksisusanto-laravel-generator/feed)WikiDiscussions 4.x Synced 1w ago

READMEChangelog (4)Dependencies (7)Versions (8)Used By (0)

Laravel Generator
=================

[](#laravel-generator)

[![PHP](https://camo.githubusercontent.com/f276fa86a026b80ddb39a8c325682146659ba56cdc872905db20f421963fe47f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737374242343f6c6f676f3d706870)](https://camo.githubusercontent.com/f276fa86a026b80ddb39a8c325682146659ba56cdc872905db20f421963fe47f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d3737374242343f6c6f676f3d706870)[![Laravel](https://camo.githubusercontent.com/bc95b277a60f94b0bed6ab0dc0aec3c8a2d4a936d41de6640562fa9e262734d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332d4646324432303f6c6f676f3d6c61726176656c)](https://camo.githubusercontent.com/bc95b277a60f94b0bed6ab0dc0aec3c8a2d4a936d41de6640562fa9e262734d9/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31332d4646324432303f6c6f676f3d6c61726176656c)[![License](https://camo.githubusercontent.com/5b5919c1ceaf2e21cf8f16cff7d35a21f400851f42c75f2cb73faf1f2c59cbde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f72)](https://camo.githubusercontent.com/5b5919c1ceaf2e21cf8f16cff7d35a21f400851f42c75f2cb73faf1f2c59cbde/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f72)[![Tests](https://github.com/adereksisusanto/laravel-generator/workflows/Tests/badge.svg)](https://github.com/adereksisusanto/laravel-generator/actions)[![PHPStan](https://github.com/adereksisusanto/laravel-generator/workflows/PHPStan/badge.svg)](https://github.com/adereksisusanto/laravel-generator/actions)[![1.x](https://camo.githubusercontent.com/5302cd914397918c32112848fa662dd9e25688fff9c194ee4b209144da914365/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f723f66696c7465723d76312e2a266c6162656c3d312e7826636f6c6f723d626c7565)](https://github.com/adereksisusanto/laravel-generator/tree/1.x)[![2.x](https://camo.githubusercontent.com/eae6b9b94ba3d3d6b8458ebcd7448eec2a291fb892b790db6ab480447f6f1332/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f723f66696c7465723d76322e2a266c6162656c3d322e7826636f6c6f723d626c7565)](https://github.com/adereksisusanto/laravel-generator/tree/2.x)[![3.x](https://camo.githubusercontent.com/195710f609e2d3d3fede978d09b06161bff2bfe7974480f587212897ffa61f2b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f723f66696c7465723d76332e2a266c6162656c3d332e7826636f6c6f723d626c7565)](https://github.com/adereksisusanto/laravel-generator/tree/3.x)[![4.x](https://camo.githubusercontent.com/1bc1a9ee23eaa1dee258737734fca07b0c2ffbdf510d2122093497c92c6c53a4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f723f66696c7465723d76342e2a266c6162656c3d342e7826636f6c6f723d626c7565)](https://github.com/adereksisusanto/laravel-generator/tree/4.x)[![Downloads](https://camo.githubusercontent.com/6b1a54b80ae26cb6412c601b035ce74aaedcb94cd88f7b0662548a30d8b4a409/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61646572656b7369737573616e746f2f6c61726176656c2d67656e657261746f72)](https://packagist.org/packages/adereksisusanto/laravel-generator)

Generate Laravel **models**, **migrations**, and **seeders** directly from your existing database tables.

Supports MySQL, PostgreSQL, SQLite, and SQL Server. Compatible with PHP 8.3+ and Laravel 13.

Installation
------------

[](#installation)

```
composer require adereksisusanto/laravel-generator
```

Publish config (optional):

```
php artisan vendor:publish --provider="Adereksisusanto\Laravel\Generator\ServiceProvider" --tag=config
```

Commands
--------

[](#commands)

```
# Generate all (models + migrations + seeders)
php artisan generate

# Individual generators
php artisan generate:model
php artisan generate:migration
php artisan generate:seeder
```

### Options

[](#options)

```
# Specific tables
php artisan generate:model --tables=users,posts

# Custom namespace (model only)
php artisan generate:model --namespace="App\Models"

# Record limit (seeder only, 0 = unlimited)
php artisan generate:seeder --limit=50

# Overwrite existing files
php artisan generate:model --force

# Custom connection
php artisan generate:model --connection=mysql

# Also generate migration and/or seeder with model
php artisan generate:model --tables=users -m
php artisan generate:model --tables=users -s
php artisan generate:model --tables=users -ms
```

### Combined command flags (`generate`)

[](#combined-command-flags-generate)

FlagDescription`--model-only`Generate only models`--migration-only`Generate only migrations`--seeder-only`Generate only seeders`--seeder-limit`Max seed records (0 = unlimited)What Gets Generated
-------------------

[](#what-gets-generated)

### Models

[](#models)

Eloquent model with `$fillable`, `$casts`, `$hidden`, relationships (`belongsTo`/`hasMany`), `HasFactory` trait, and `SoftDeletes` trait when `deleted_at` column exists.

### Migrations

[](#migrations)

`Schema::create()` with proper column types, nullable, unsigned, defaults, and indexes.

### Seeders

[](#seeders)

`Model::insert([...])` populated with actual data from your database table.

Configuration
-------------

[](#configuration)

```
// config/generator.php

'tables' => [
    'includes' => [],
    'excludes' => ['migrations', 'failed_jobs'],
],
'paths' => [
    'model' => app_path('Models'),
    'migration' => database_path('migrations'),
    'seeder' => database_path('seeders'),
],
'model' => [
    'timestamps' => true,
    'soft_deletes' => false,
    'relationships' => true,
],
'seeder' => [
    'limit' => 100,
],
```

Contributing
------------

[](#contributing)

See [CONTRIBUTING](CONTRIBUTING.md) for contribution guidelines.

Changelog
---------

[](#changelog)

See [CHANGELOG](CHANGELOG.md) for recent changes.

License
-------

[](#license)

The MIT License (MIT). See [LICENSE](LICENSE) for more information.

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance90

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

8

Last Release

48d ago

Major Versions

1.x-dev → 2.x-dev2026-07-10

v2.0.0 → 3.x-dev2026-07-10

v3.0.0 → 4.x-dev2026-07-10

PHP version history (4 changes)v1.0.0PHP &gt;=7.2.5

2.x-devPHP ^8.0

3.x-devPHP ^8.1

4.x-devPHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34746706?v=4)[Ade Reksi Susanto](/maintainers/adereksisusanto)[@adereksisusanto](https://github.com/adereksisusanto)

---

Top Contributors

[![adereksisusanto](https://avatars.githubusercontent.com/u/34746706?v=4)](https://github.com/adereksisusanto "adereksisusanto (14 commits)")

---

Tags

phplaravelmigrationdatabasegeneratorcode generatorscaffoldmodeleloquentseeder

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/adereksisusanto-laravel-generator/health.svg)

```
[![Health](https://phpackages.com/badges/adereksisusanto-laravel-generator/health.svg)](https://phpackages.com/packages/adereksisusanto-laravel-generator)
```

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.1k4.6M342](/packages/laravel-ai)[spatie/laravel-backup

A Laravel package to backup your application

6.0k25.4M275](/packages/spatie-laravel-backup)[illuminate/queue

The Illuminate Queue package.

20433.0M1.9k](/packages/illuminate-queue)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

5031.3k](/packages/erag-laravel-lang-sync-inertia)[toponepercent/baum

Baum is an implementation of the Nested Set pattern for Eloquent models.

3265.4k5](/packages/toponepercent-baum)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
