class FactoryBuilder (View source)

Methods

void
__construct( string $class, string $name, array $definitions, Generator $faker)

Create an new builder instance.

$this
times( int $amount)

Set the amount of models you wish to create / make.

mixed
create( array $attributes = array())

Create a collection of models and persist them to the database.

mixed
make( array $attributes = array())

Create a collection of models.

Details

at line line 55
void __construct( string $class, string $name, array $definitions, Generator $faker)

Create an new builder instance.

Parameters

string $class
string $name
array $definitions
Generator $faker

Return Value

void

at line line 69
$this times( int $amount)

Set the amount of models you wish to create / make.

Parameters

int $amount

Return Value

$this

at line line 82
mixed create( array $attributes = array())

Create a collection of models and persist them to the database.

Parameters

array $attributes

Return Value

mixed

at line line 103
mixed make( array $attributes = array())

Create a collection of models.

Parameters

array $attributes

Return Value

mixed