Add missing test factories
This commit is contained in:
14
database/factories/CountryFactory.php
Normal file
14
database/factories/CountryFactory.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
|
||||
$factory->define(App\Models\Country::class, function (Faker $faker) {
|
||||
return [
|
||||
'id'=>1222,
|
||||
];
|
||||
});
|
||||
|
||||
$factory->afterMaking(App\Models\Country::class, function ($service,$faker) {
|
||||
$taxes = factory(App\Models\Tax::class,1)->make();
|
||||
$service->setRelation('taxes',$taxes);
|
||||
});
|
Reference in New Issue
Block a user