mirror of
https://github.com/crater-invoice/crater.git
synced 2025-10-28 12:11:08 -04:00
refactor factories
This commit is contained in:
14
database/factories/PaymentMethodFactory.php
Normal file
14
database/factories/PaymentMethodFactory.php
Normal 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,
|
||||
];
|
||||
});
|
||||
Reference in New Issue
Block a user