gguney / rseeder by gguney

Reverse Seeder for Laravel
3,210
3
2
Package Data
Maintainer Username: gguney
Maintainer Contact: gokhanguneygg@gmail.com (Gokhan Guney)
Package Create Date: 2017-03-17
Package Last Update: 2022-02-23
Home Page: https://packagist.org/packages/gguney/rseeder
Language: PHP
License: MIT
Last Refreshed: 2024-11-14 15:00:36
Package Statistics
Total Downloads: 3,210
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 3
Total Watchers: 2
Total Forks: 2
Total Open Issues: 1

RSeeder - Reverse Seeder Library

Reverse Seeder Library for Laravel

Requirements

  • RSeeder works with PHP 5.6 or above.

Installation

$ composer require gguney/rseeder

Add package's service provider to your config/app.php

...
        GGuney\RSeeder\RSeederServiceProvider::class,
...

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