2017 © Pedro Peláez
 

library gardener

Smart seeders for Laravel. created and developed by gizburdt

image

alasit/gardener

Smart seeders for Laravel. created and developed by gizburdt

  • Wednesday, October 12, 2016
  • by diego0417
  • Repository
  • 2 Watchers
  • 4 Stars
  • 204 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 36 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Smart seeder for Laravel

Seeding as it is currently done in Laravel is intended only for dev builds, but what if you're iteratively creating your database and want to constantly flush it and repopulate it during development? What if you want to seed a production database with different data from what you use in development? What if you want to seed a table you've added to a database that is currently in production with new data?, (*1)

Features

  • Allows you to seed databases in different environments with different values.
  • Allows you to "version" seeds the same way that Laravel currently handles migrations. Running php artisan seed will only run seeds that haven't already been run.
  • Prompts you if your database is in production.
  • Allows you to run multiple seeds of the same model/table
  • Overrides Laravel's seeding commands. SmartSeeder will fire when you run php artisan db:seed or php artisan migrate:refresh --seed
  • You can run a single seed file with the --file option. php artisan seed:run --file=seed_2015_05_27_030017_UserSeeder

Use

When you install SmartSeeder, various artisan commands are made available to you which use the same methodology you're used to using with Migrations., (*2)

seed:run Runs all the seeds in the smartSeeds directory that haven't been run yet.
seed:make Makes a new seed class in the environment you specify.
seed:rollback Rollback doesn't undo seeding (which would be impossible with an auto-incrementing primary key). It just allows you to re-run the last batch of seeds.
seed:reset Resets all the seeds.
seed:refresh Resets and re-runs all seeds.
seed:install You don't have to use this... it will be run automatically when you call "seed"

Installation

  • Add require: "gizburdt/gardener": "5.2.*" to your composer.json and run an update to bring it in (or run composer require jlapp/smartseeder).
  • Add Jlapp\SmartSeeder\SmartSeederServiceProvider::class to your providers array in app/config/app.php
  • Run php artisan vendor:publish to push config files to your config folder if you want to override the name of the seeds folder or the name of the table where seeds are stored

The Versions

12/10 2016

dev-master

9999999-dev

Smart seeders for Laravel. created and developed by gizburdt

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder

24/03 2016

5.2.5

5.2.5.0

Smart seeders for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder

24/03 2016

5.2.4

5.2.4.0

Smart seeders for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder

17/03 2016

5.2.2

5.2.2.0

Smart seeders for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder

17/03 2016

5.2.1

5.2.1.0

Smart seeders for Laravel.

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder

17/03 2016

5.2.0

5.2.0.0

Smart Seeder adds the same methology to seeding that is currently used with migrations in order to let you seed in batches, seed to production databases or other environments, and to rerun seeds without wiping out your data.

  Sources   Download

MIT

The Requires

 

The Development Requires

database laravel table smart seed seeding seeder