refactor factories

This commit is contained in:
radhu587
2020-06-22 17:07:35 +05:30
parent 2e5cb58c39
commit e8f046f02e
5 changed files with 39 additions and 11 deletions

View File

@ -0,0 +1,14 @@
<?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use Crater\PaymentMethod;
use Crater\User;
use Faker\Generator as Faker;
$factory->define(PaymentMethod::class, function (Faker $faker) {
return [
'name' => $faker->name,
'company_id' => User::find(1)->company_id,
];
});