15 lines
357 B
PHP
15 lines
357 B
PHP
<?php
|
|
|
|
use Faker\Generator as Faker;
|
|
|
|
$factory->define(App\Models\Account::class, function (Faker $faker) {
|
|
return [
|
|
'id'=>1,
|
|
];
|
|
});
|
|
|
|
$factory->afterMaking(App\Models\Account::class, function ($service,$faker) {
|
|
$country = factory(App\Models\Country::class)->make();
|
|
$service->setRelation('country',$country);
|
|
$service->country_id = $country->id;
|
|
}); |