ProjectFactory.php 527 Bytes
Newer Older
1 2 3 4 5
<?php

use Faker\Generator as Faker;

$factory->define(\App\Project::class, function (Faker $faker) {
6
    $status = $faker->randomElement(['opened', 'closed', 'locked', 'merged']);
7
    return [
8
        'title' => $faker->sentence(),
9
        'payment_id' => $faker->sha256,
10 11 12 13 14
        'target_amount' => $faker->randomFloat(2, 0, 2000),
        'state' => $status,
        'merge_request_id' => $faker->randomNumber(6),
        'created_at' => $faker->dateTimeThisYear,
        'updated_at' => $faker->dateTimeThisYear,
15 16
    ];
});