gguney / rseeder
Reverse Seeder for Laravel
Installs: 3 210
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 1
Requires
- php: 8.0
Requires (Dev)
- php: 8.0
This package is auto-updated.
Last update: 2024-10-23 14:29:21 UTC
README
This package creates Laravel seeders from present data in your database table.
Requirements
- RSeeder works with PHP8 or above.
- If you have older version of Laravel please check 1.x
Installation
$ composer require gguney/rseeder
Usage
$ php artisan make:reverseSeeder table_name
If you want to get rows from a date, you can use like: ######Warning: From date will not be included.
$ php artisan make:reverseSeeder table_name --from=1990-01-22 --by=created_at
Also, you can ignore some columns:
$ php artisan make:reverseSeeder table_name --except=id,is_created
All together:
$ php artisan make:reverseSeeder food_orders --from='2017-03-17 10:00:00' --by=created_at --except=id
Output:
$ FoodOrdersTableSeeder named seeder created in seeds folder.
Author
Gökhan Güney - gokhanguneygg@gmail.com
License
RSeeder is licensed under the MIT License - see the LICENSE
file for details