class DBSeeder

Supports operations related to database seeding.

Constants

private FACTORY_PATH

Path to all user created factory classes.

private SEEDER_NAMESPACE

Namespace for seeder classes to be accessible outside this class.

private SEEDER_PATH

Path to all seeder classes.

Methods

static string
factory(string $modelName)

Returns contents for new factory class.

static int
makeFactory(string $factoryName)

Creates a new factory class.

static int
makeSeeder(string $seederName)

Creates a class for seeding a database.

static int
seed(InputInterface $input)

Runs command for seeding database.

static string
seeder(string $seederName)

Returns a string containing contents of a new Seeder class.

Details

at line 35
static string factory(string $modelName)

Returns contents for new factory class.

Parameters

string $modelName

The name of the model the new factory will target.

Return Value

string

The contents of the new factory class.

at line 67
static int makeFactory(string $factoryName)

Creates a new factory class.

Parameters

string $factoryName

The name for the new factory class.

Return Value

int

A value that indicates success, invalid, or failure.

at line 83
static int makeSeeder(string $seederName)

Creates a class for seeding a database.

Parameters

string $seederName

The name for the new seeder class.

Return Value

int

A value that indicates success, invalid, or failure.

at line 99
static int seed(InputInterface $input)

Runs command for seeding database.

Parameters

InputInterface $input

The Symfony InputInterface object.

Return Value

int

A value that indicates success, invalid, or failure.

at line 114
static string seeder(string $seederName)

Returns a string containing contents of a new Seeder class.

Parameters

string $seederName

The name of the Seeder class.

Return Value

string

The contents of the seeder class.