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:
Lukas Halbritter
2018-09-13 16:04:40 +02:00
parent 47569b0525
commit f394ed773b
5 changed files with 23 additions and 15 deletions
+9 -1
View File
@@ -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')
];
});