PHPackages                             codingphase/seeder - 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. codingphase/seeder

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

codingphase/seeder
==================

Easy seeding database for Laravel Applications.

v1.0.11(6y ago)15.0kMITPHPPHP &gt;=5.5.9

Since Feb 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/CodingPhase/seeder)[ Packagist](https://packagist.org/packages/codingphase/seeder)[ RSS](/packages/codingphase-seeder/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependenciesVersions (13)Used By (0)

Seeder
======

[](#seeder)

Easy seeding database for Laravel Applications

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

[](#installation)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require codingphase/seeder

```

### Step 2: Register Service Provider

[](#step-2-register-service-provider)

Add your new provider to the `providers` array of `config/app.php`:

```
  'providers' => [
      // ...
      CodingPhase\Seeder\SeederServiceProvider::class,
      // ...
  ],
```

Publish config

```
php artisan vendor:publish  --provider="CodingPhase\Seeder\SeederServiceProvider"
```

Usage
-----

[](#usage)

Extend your seeders with ModelSeeder:

```
use CodingPhase\Seeder\ModelSeeder;

class UsersTableSeeder extends ModelSeeder
{
    ...
}
```

Implement run method:

```
/**
 * Run the database seeds.
 *
 * @return void
 */
public function run
{
    //Example
    $users = $this->seedModel(\App\User::class, function ($user) {
        $user->save();
    });
}
```

\##API:

### setAmount(int)

[](#setamountint)

Default amount of seeding resources that are seeded are stored in config. If you want to seed another value of resources, you can.

```
$this->setAmount(30)->seedModel(\App\User::class, function ($user) {
    $user->save();
});
```

### setHeader(string)

[](#setheaderstring)

Define header before progress bar in output (default is model namespace)

```
$this->setHeader("Awesome Users")->seedModel(\App\User::class, function ($user) {
    $user->save();
});
```

### setCompact(bool)

[](#setcompactbool)

Default true. Define style of Progress Bar.

```
$this->setAmount(30)->seedModel(\App\User::class, function ($user) {
    $user->save();
});
```

### useData(array)

[](#usedataarray)

Set data that will be used to fill resources. It overrides model factory data.

```
$data = [
    1 => [
        'name' => 'test',
        'email' => 'test@test.com'
    ],
    25 => [
        'name' => 'example'
        'email' => 'example@example.com',
    ],
];

$this->useData($data)->seedModel(\App\User::class, function ($user) {
    $user->save();
});
```

- first user will have name `test` and email `test@test.com`
- 25th user will have name `example` and email `example@example.com`

\##Practical Examples

```
use CodingPhase\Seeder\ModelSeeder;

class UsersTableSeeder extends ModelSeeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run
    {
        $adminsData = [
            1 => [
                'name' => 'test',
                'email' => 'test@test.com',
                'password' => bcrypt('123456')
            ],
            4 => [
                'name' => 'test4',
                'email' => 'test4@test.com',
                'password' => bcrypt('654321')
            ],
        ];

        $admins = $this->useData($adminsData)
            ->setAmount(5)
            ->setHeader("Seeding Admins")
            ->setCompact(false)
            ->seedModel(\App\User::class, function ($user) {
                $user->admin = 1;
                $user->save();
            });

        $users = $this->setHeader("Seeding Regular Users")
            ->seedModel(\App\User::class, function ($user) {
                $user->save();
            });
    }
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity65

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

Recently: every ~201 days

Total

12

Last Release

2388d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/585fea021c5d2840a3a843dd8bf6cc67942d0224c37acb3044de346eed3a18fc?d=identicon)[Hesto](/maintainers/Hesto)

---

Top Contributors

[![Hesto](https://avatars.githubusercontent.com/u/13649507?v=4)](https://github.com/Hesto "Hesto (16 commits)")

---

Tags

laravelseed

### Embed Badge

![Health badge](/badges/codingphase-seeder/health.svg)

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

###  Alternatives

[orangehill/iseed

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

2.9k9.7M63](/packages/orangehill-iseed)[nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

37739.1k](/packages/nwidart-db-exporter)[tyghaykal/laravel-seed-generator

Laravel Seed Generator

8246.1k1](/packages/tyghaykal-laravel-seed-generator)

PHPackages © 2026

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