welderlourenco/laravel-seeder

Run your seeder files without touching your DatabaseSeeder.php file.
543
Install
composer require welderlourenco/laravel-seeder
Latest Version:1.0.1
PHP:>=5.4.0
License:MIT
Last Updated:Sep 4, 2014
Links: GitHub  ·  Packagist
Maintainer: welderlourenco

Laravel Seeder

Run one or more of your seeder files with this very easy command.

Introduction

Did you notice the work it takes to perform database seeding in Laravel nowadays? Uncomment, comment and uncomment your calls again. Well, not anymore, with Laravel Seeder all the boring and unnecessary work it's done! Here you can perform a database seeding with only one command without having to modify your DatabaseSeeder.php file. Amazing huh?

Instalation

Required steps

In the require key of master composer.json file add the following.

"welderlourenco/laravel-seeder" : "dev-master"

Run the Composer update comand

composer update

Once this operation completes, the final step is to add the provider in the app/config/app.php config file.

return array(

  // ...
  'providers' => array(
  	// ...
    'WelderLourenco\LaravelSeeder\Providers\LaravelSeederServiceProvider'
  ),

)

Usage

Laravel Seeder adds to your db command namespace, two more commands:

php artisan db:all

It will search for all Seeder files inside your /seeds folder and run them.

php artisan db:only --files="UserTableSeeder"

It will run only the files you specify in the --files option, please, notice that you can pass multiple files separated by colon: --files="UserTableSeeder, RoleTableSeeder, PermissionTableSeeder"

Thanks

Thank God for the knowledge to write all this.

Related Packages

nwidart/db-exporter-l4.0

Export your database quickly and easely as a Laravel Migration and all the data...

15 5
jeroenzwart/laravel-csv-seeder

Seed the database with Laravel using CSV files

420,916 94
alasit/gardener

Smart seeders for Laravel. created and developed by gizburdt

224 5
jlapp/smart-seeder

Smart Seeder adds the same methology to seeding that is currently used with migr...

3,075 190
illuminatech/enum-seeder

Allows easy creation of DB seeders for the dictionary (enum) type tables

1,857 3