PHPackages                             skychf/reap - 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. skychf/reap

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

skychf/reap
===========

Generate a new Laravel database seed file based on data from the existing database table.

v2.5(5y ago)190MITPHPPHP &gt;=7.2.0

Since Nov 18Pushed 5y ago1 watchersCompare

[ Source](https://github.com/skychf/laravel-reap)[ Packagist](https://packagist.org/packages/skychf/reap)[ Docs](https://github.com/skychf/laravel-reap)[ RSS](/packages/skychf-reap/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (10)Used By (0)

Reap
====

[](#reap)

Installation
============

[](#installation)

With composer :

```
{
    ...
    "require": {
        "skychf/reap": "1.*"
    }
}

```

Usage
=====

[](#usage)

修改 config/app.php :

```
'providers' => array(
        'Skychf\Reap\ReapServiceProvider'
)

```

Artisan command options
-----------------------

[](#artisan-command-options)

### \[table\_name\]

[](#table_name)

Mandatory parameter which defines which table/s will be used for seed creation. Use CSV notation for multiple tables. Seed file will be generated for each table.

Examples:

```
php artisan db:reap my_table

```

```
php artisan db:reap my_table,another_table

```

### force

[](#force)

Optional parameter which is used to automatically overwrite any existing seeds for desired tables

Example: The following command will overwrite `UsersTableSeeder.php` if it already exists in laravel's seeds directory.

```
php artisan db:reap users --force

```

### clean

[](#clean)

Optional parameter which will clean `app/database/seeds/DatabaseSeeder.php` before creating new seed class.

Example:

```
php artisan db:reap users --clean

```

### database

[](#database)

Optional parameter which specifies the DB connection name.

Example:

```
php artisan db:reap users --database=mysql2

```

### max

[](#max)

Optional parameter which defines the maximum number of entries seeded from a specified table. In case of multiple tables, limit will be applied to all of them.

Example:

```
artisan db:reap users --max=10

```

### prerun

[](#prerun)

Optional parameter which assigns a laravel event name to be fired before seeding takes place. If an event listener returns `false`, seed will fail automatically. You can assign multiple preruns for multiple table names by passing an array of comma separated DB names and respectively passing a comma separated array of prerun event names.

Example: The following command will make a seed file which will fire an event named 'someEvent' before seeding takes place.

```
artisan db:reap users --prerun=someEvent

```

The following example will assign `someUserEvent` to `users` table seed, and `someGroupEvent` to `groups` table seed, to be executed before seeding.

```
artisan db:reap users,groups --prerun=someUserEvent,someGroupEvent

```

The following example will only assign a `someGroupEvent` to `groups` table seed, to be executed before seeding. Value for the users table prerun was omitted here, so `users` table seed will have no prerun event assigned.

```
artisan db:reap users,groups --prerun=,someGroupEvent

```

### postrun

[](#postrun)

Optional parameter which assigns a laravel event name to be fired after seeding takes place. If an event listener returns `false`, seed will be executed, but an exception will be thrown that the postrun failed. You can assign multiple postruns for multiple table names by passing an array of comma separated DB names and respectively passing a comma separated array of postrun event names.

Example: The following command will make a seed file which will fire an event named 'someEvent' after seeding was completed.

```
artisan db:reap users --postrun=someEvent

```

The following example will assign `someUserEvent` to `users` table seed, and `someGroupEvent` to `groups` table seed, to be executed after seeding.

```
artisan db:reap users,groups --postrun=someUserEvent,someGroupEvent

```

The following example will only assign a `someGroupEvent` to `groups` table seed, to be executed after seeding. Value for the users table postrun was omitted here, so `users` table seed will have no postrun event assigned.

```
artisan db:reap users,groups --postrun=,someGroupEvent

```

License
=======

[](#license)

This library is under MIT license, have a look to the `LICENSE` file

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

Established project with proven stability

 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 ~204 days

Recently: every ~285 days

Total

9

Last Release

1834d ago

Major Versions

v1.2 → V2.02018-03-22

PHP version history (3 changes)v1.0PHP &gt;=5.6.0

V2.0PHP &gt;=7.0.13

v2.2PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/6e865617028a0be2ebcc1a172be23b2624e2d9c1632daa775352d8239e138252?d=identicon)[skychf](/maintainers/skychf)

---

Top Contributors

[![skychf](https://avatars.githubusercontent.com/u/4261305?v=4)](https://github.com/skychf "skychf (8 commits)")

---

Tags

laravelartisanreap

### Embed Badge

![Health badge](/badges/skychf-reap/health.svg)

```
[![Health](https://phpackages.com/badges/skychf-reap/health.svg)](https://phpackages.com/packages/skychf-reap)
```

###  Alternatives

[xethron/migrations-generator

Generates Laravel Migrations from an existing database

3.3k3.3M25](/packages/xethron-migrations-generator)

PHPackages © 2026

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