PHP code example of eklundkristoffer / seedster

1. Go to this page and download the library: Download eklundkristoffer/seedster library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

eklundkristoffer / seedster example snippets


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, ...]
    );
}