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

use Faker\Generator as Faker;

$factory->define(\App\Project::class, function (Faker $faker) {
6
    $state = $faker->randomElement(['OPENED', 'IDEA', 'FUNDING-REQUIRED', 'WORK-IN-PROGRESS', 'COMPLETED']);
7
    $status = $faker->randomElement(['opened', 'closed', 'locked', 'merged']);
8
    return [
9
        'title' => $faker->sentence(),
10
        'payment_id' => $faker->sha256,
11
12
13
        'address' => $faker->sha256,
        'address_uri' => "monero:{$faker->sha256}",
        'qr_code' => $faker->file(),
14
        'target_amount' => $faker->randomFloat(2, 0, 2000),
15
        'raised_amount' => $faker->randomFloat(2, 0, 2000),
16
        'state' => $state,
17
        'author' => $faker->userName,
18
        'gitlab_url' => $faker->url,
19
20
        'created_at' => $faker->dateTimeThisYear,
        'updated_at' => $faker->dateTimeThisYear,
21
22
    ];
});