Awesome
seedster
Register laravel seeds from a package
Installation
require the project using Composer:
composer require eklundkristoffer/seedster
or manually update your require block and run composer update
{
"require": {
"eklundkristoffer/seedster": "^5.0"
}
}
Usage
You can now register a seed from any service provider
use Mypackage\Database\Seeds\PostsTableSeeder;
use Mypackage\Database\Seeds\UsersTableSeeder;
public function register()
{
$this->app['seed.handler']->register(
UsersTableSeeder::class
);
// Or register an array of seeds
$this->app['seed.handler']->register(
[UsersTableSeeder::class, PostsTableSeeder::class, ...]
);
}