4.0 2020-09-14 16:33 UTC

This package is auto-updated.

Last update: 2021-04-18 12:17:32 UTC


README

Latest Stable Version Total Downloads License: MIT

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": "^4.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, ...]
    );
}