PHPackages                             chojnicki/laravel-seeder-extended - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. chojnicki/laravel-seeder-extended

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

chojnicki/laravel-seeder-extended
=================================

Extend functionality of Seeder with helpful methods and debug info.

v1.1(6y ago)11421MITPHP

Since Jul 14Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)Dependencies (1)Versions (3)Used By (0)

Laravel Seeder Extended
=======================

[](#laravel-seeder-extended)

Extend default Seeder with extra funcionality.

NOTE: This library mixes my [laravel-seeder-debugger](https://github.com/chojnicki/laravel-seeder-debugger) with extra methods. If you do not wanna use any methods listed below and just need debugger, you can just use [chojnicki/laravel-seeder-debugger](https://github.com/chojnicki/laravel-seeder-debugger) instead.

Requirements
------------

[](#requirements)

- Laravel / Lumen 5.5 or higher (written on 5.8, not tested on lower than 5.5 but should work on 5.\*)

Instalation with Composer
-------------------------

[](#instalation-with-composer)

```
composer require chojnicki/laravel-seeder-extended

```

Usage
-----

[](#usage)

In DatabaseSeeder.php simply replace:

```
use Illuminate\Database\Seeder;

```

with:

```
use Chojnicki\LaravelSeederExtended\Seeder;

```

Available methods
-----------------

[](#available-methods)

### insertMultiple($collection, $chunkSize = 1000, $sorted = true)

[](#insertmultiplecollection-chunksize--1000-sorted--true)

If you use Factory to create for example 10,000 posts then saving them will cause 10,000 queries to database (what will be slow). You can insert multiple items to database with single query passing collection of models to insertMultiple().

Be default 1000 models will be inserted in single query. For models with long data you can decrease this, and for very small models increase. Try to find sweet spot that will be fastest for you ;)

Records will be inserted sorted from the oldest to newest. You can disable this at third parameter and use custom sorting instead.

```
$this->insertMultiple($posts);

```

### setRandomDate($model, $max = 15552000)

[](#setrandomdatemodel-max--15552000)

Short way to generate random date (for created\_at and updated\_at at once) on model. De default range is 6 months and you can change this in second parameter (in seconds). Method will return Carbon date if you need to use it somewhere else.

```
$this->setRandomDate($post);

```

### Any ideas for more? Feedback and pull requests are welcome :)

[](#any-ideas-for-more-feedback-and-pull-requests-are-welcome-)

Debug
-----

[](#debug)

After finished seeding console will debug info like this:

```
Database seeding completed successfully.
Seeding execution time: 8.6s.
Database queries executed: 329.
Current RAM usage is 18.7MB with peak during execution 59.1MB.

```

Thanks to this info you can try to write more efficient seeders :)

[More info -&gt; chojnicki/laravel-seeder-debugger](https://github.com/chojnicki/laravel-seeder-debugger)

Note
----

[](#note)

This debugger simply extends original Seeder library (it's not a fork) so all functionality is preserved and there should not be conflicts with already written seeders.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity60

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

Total

2

Last Release

2255d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/34774522?v=4)[Łukasz Chojnicki](/maintainers/chojnicki)[@chojnicki](https://github.com/chojnicki)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/chojnicki-laravel-seeder-extended/health.svg)

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

###  Alternatives

[guava/filament-drafts

A filament plugin that adds the ability to manage drafts and revisions of your models.

7514.3k](/packages/guava-filament-drafts)

PHPackages © 2026

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