Added model factories for the remaining models.

This commit is contained in:
Lukas Halbritter
2018-09-12 11:56:28 +02:00
parent fcc59f16ae
commit 15c32209b2
4 changed files with 43 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
<?php
use Faker\Generator as Faker;
$factory->define(App\Project::class, function (Faker $faker) {
$start_date = $faker->dateTimeBetween('2014-01-01');
return [
'name' => 'Project ' . $faker->word() . ' ' . $start_date->format('Y'),
'start_date' => $start_date,
'end_date' => $faker->dateTimeInInterval($start_date, '+ 26 weeks')
];
});