Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ### Create Exist Database Table into Migration File. Folder Path ```database/migrations``` [Reference URL](https://tinyurl.com/3kbtmdn9)
- 1. install package via composer
- ```composer require --dev kitloong/laravel-migrations-generator```
- 2. generate all database migration file into database/migrations
- ```php artisan migrate:generate```
- 3. if you want to create specific migration table.
- ```php artisan migrate:generate --tables="table1,table2,table3,table4,table5"```
- 4. if you want to ignore table and create migration table
- ```php artisan migrate:generate --ignore="table3,table4,table5"```
- ### Export Exist Table Data Using Seeders. Folder Path ```database/seeders``` [Reference URL](https://tinyurl.com/3mftwcwb)
- 1. install package via composer
- ```composer require orangehill/iseed```
- 2. Export ```users``` Table Data Export
- ```php artisan iseed users```
- 3. Import Table Data ```UsersTableSeeder``` Class name
- ```php artisan db:seed --class=UsersTableSeeder```
- 4. Export All Exported Seeds/Data
- ```php artisan iseed --tables=all```
- 5. Import All Exported Seed/Data
- ```php artisan db:seed```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement