8.0 2024-03-13 00:41 UTC

This package is auto-updated.

Last update: 2024-10-13 02:12:33 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": "^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, ...]
    );
}