FactoryBuilder (Database\Eloquent)
FactoryBuilder
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
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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.2/Illuminate/Database/Eloquent/FactoryBuilder.html