killmenot/undo-seeder-laravel

A way to rollback seeds in Laravel

Installs: 9

Dependents: 0

Suggesters: 0

Security: 0

Stars: 15

Watchers: 2

Forks: 7

Open Issues: 0

pkg:composer/killmenot/undo-seeder-laravel

dev-master 2016-05-23 21:28 UTC

This package is not auto-updated.

Last update: 2025-10-23 05:29:26 UTC


README

Features

  • Allows to have up and down method for every seed. (Your seeds should be inherited from Intspirit\UndoSeeder\UndoSeeder and override up and down methods)
  • Ability to call undo for other seeds using undo method.

Use

When you install UndoSeeder, the following artisan commands are made available:

db:seed-undoUndo seeds in the seeds directory.
db:seed-refreshUndo seeds run seeds again.

Installation

  • Add require: "killmenot/undo-seeder-laravel": "dev-master" to your composer.json and run an update to bring it in (or run composer require killmenot/undo-seeder-laravel).
  • Add Intspirit\UndoSeeder\UndoSeederServiceProvider::class to your providers array in app/config/app.php