Package Data | |
---|---|
Maintainer Username: | welderlourenco |
Maintainer Contact: | welderlourenco@yahoo.com.br (Welder Lourenço) |
Package Create Date: | 2014-06-10 |
Package Last Update: | 2014-09-04 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-19 03:08:00 |
Package Statistics | |
---|---|
Total Downloads: | 540 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Run one or more of your seeder files with this very easy command.
Did you notice the work it takes to perform database seeding in Laravel nowadays? Uncomment, comment and uncomment your calls again. Well, not anymore, with Laravel Seeder all the boring
and unnecessary
work it's done! Here you can perform a database seeding with only one command without having to modify your DatabaseSeeder.php file. Amazing huh?
In the require key of master composer.json file add the following.
"welderlourenco/laravel-seeder" : "dev-master"
Run the Composer update comand
composer update
Once this operation completes, the final step is to add the provider in the app/config/app.php config file.
return array(
// ...
'providers' => array(
// ...
'WelderLourenco\LaravelSeeder\Providers\LaravelSeederServiceProvider'
),
)
Laravel Seeder adds to your db
command namespace, two more commands:
php artisan db:all
It will search for all Seeder files inside your /seeds
folder and run them.
php artisan db:only --files="UserTableSeeder"
It will run only the files you specify in the --files
option, please, notice that you can pass
multiple files separated by colon: --files="UserTableSeeder, RoleTableSeeder, PermissionTableSeeder"
Thank God for the knowledge to write all this.