eklundkristoffer / seedster
Installs: 615 481
Dependents: 8
Suggesters: 0
Security: 0
Stars: 24
Watchers: 2
Forks: 6
Open Issues: 0
Requires
- illuminate/support: 5.5.*|5.6.*|5.7.*|5.8.*|6.*|^7.0|^8.0|^9.0|^10.0|^11.0
README
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, ...] ); }