Changed foreign key id field name in person_targets and account_classes from
'io_type' to 'io_type_id'. Implemented PersonTarget factory.
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
<?php
|
||||
|
||||
use Faker\Generator as Faker;
|
||||
use Carbon\Carbon;
|
||||
|
||||
use App\IOType;
|
||||
|
||||
$factory->define(App\PersonTarget::class, function (Faker $faker) {
|
||||
return [
|
||||
//
|
||||
'io_type_id' => IOType::all('id')->random()->id,
|
||||
'date' => $faker->dateTimeInInterval('2014-04-01'),
|
||||
'amount' => $faker->randomFloat(2, 10, 2000),
|
||||
'reference' => $faker->text(20),
|
||||
'created_at' => Carbon::now()->format('Y-m-d H:i:s'),
|
||||
'updated_at' => Carbon::now()->format('Y-m-d H:i:s')
|
||||
];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user