helios-live / reseedr
Easily create snapshots of tables and seed them back in
Installs: 68
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/helios-live/reseedr
Requires
- php: ^8.3
- illuminate/contracts: ^9.28|^10.0|^11.0|^12.0
- spatie/laravel-package-tools: ^1.92
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 // database/dumps/ 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'], ]);