helios-live/reseedr

Easily create snapshots of tables and seed them back in

0.0.1 2025-06-16 13:13 UTC

This package is auto-updated.

Last update: 2025-06-16 13:14:25 UTC


README

Dump tables to php for easy re-seed.

composer require helios-live/reseedr
php artisan reseedr:export-table users
php artisan reseedr:export-table terms

DatabaseSeeder.php:

// if no options are given to the call, the seeder scans the
// storage/app/private/seed-data/ directory for php files and uses that
// however the ordering might not be what you need
$this->call(\HeliosLive\Reseeder\Seeders\ReSeed::class);

DatabaseSeeder.php:

// if given the tables option, it will only reseed those tables, in the 
// specified order
$this->call(\HeliosLive\Reseeder\Seeders\ReSeed::class,
true,
[
    'tables' => ['users', 'terms'],
]);