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

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

amestsantim/laravel-seeder-with-data-generator
==============================================

Generate laravel seeders with data

1.1(6y ago)015MITPHPPHP ^7.0

Since May 23Pushed 6y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Laravel Seeder (with data) Generator
====================================

[](#laravel-seeder-with-data-generator)

This is a laravel package which adds a generator command (make) to your artisan commands that will generate a database seeder class for you. It is similar to the included seeder class generator except that this generator allows you to pass data to it to include in the seeder class.

This can come in handy in situations where you might have database entries you want to be included with your deployment (such as roles and permissions, etc.)

`make:seeder-with-data`

Install
-------

[](#install)

```
composer require amestsantim/laravel-seeder-with-data-generator

```

Usage
-----

[](#usage)

`make:seeder-with-data [options] [--]  []`

```
Arguments:
     tableName             The name of the DB table
     data                  The data, as a serialized array of named index arrays [default: "[]"]
Options:
      --path[=PATH]         Path where the seeder file should be saved
      --timestamps          If present, this switch will enable the automatic insertion of timestamps
```

### Examples

[](#examples)

```
php artisan make:seeder-with-data permissions "[['guard_name' => 'web', 'name' => 'Make Seeders'], ['guard_name' => 'web', 'name' => 'Run Seeders']]"
```

Notice the format that we use, the data argument is passed in as is. Remember to put it in double quotation marks.

...this will give you:

```
