public function haveMultiple($model, $times, $attributes = [], $name = 'default')
    {
        try {
            return $this->modelFactory($model, $name, $times)->create($attributes);
        } catch (\Exception $e) {
            $this->fail("Could not create model: \n\n" . get_class($e) . "\n\n" . $e->getMessage());
        }
    }
public function haveMultiple($model, $times, $attributes = [], $name = 'default')
    {
        try {
            return $this->modelFactory($model, $name, $times)->create($attributes);
        } catch (\Exception $e) {
            $this->fail("Could not create model: \n\n" . get_class($e) . "\n\n" . $e->getMessage());
        }
    }
public function haveMultiple ( $ model , $ times , $ attributes = [ ] , $ name = 'default' ) { try { return $ this -> modelFactory ( $ model , $ name , $ times ) -> create ( $ attributes ) ; } catch ( \ Exception $ e ) { $ this -> fail ( "Could not create model: \n\n" . get_class ( $ e ) . "\n\n" . $ e -> getMessage ( ) ) ; } }
Use Laravel's model factory to create multiple models.
Can only be used with Laravel 5.1 and later.

``` php
<?php
$I->haveMultiple('App\User', 10);
$I->haveMultiple('App\User', 10, ['name' => 'John Doe']);
$I->haveMultiple('App\User', 10, [], 'admin');
?>
```

@see http://laravel.com/docs/5.1/testing#model-factories
@param string $model
@param int $times
@param array $attributes
@param string $name
@return mixed
@part orm
Use Laravel s model factory to create multiple models . Can only be used with Laravel 5 . 1 and later .