You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
618 B
22 lines
618 B
<?php
|
|
|
|
use App\Entities\Invoices\Invoice;
|
|
use App\Entities\Projects\Project;
|
|
use App\Entities\Users\User;
|
|
use Faker\Generator as Faker;
|
|
|
|
$factory->define(Invoice::class, function (Faker $faker) {
|
|
return [
|
|
'project_id' => function () {
|
|
return factory(Project::class)->create()->id;
|
|
},
|
|
'number' => (new Invoice())->generateNewNumber(),
|
|
'items' => [],
|
|
'date' => '2010-10-10',
|
|
'amount' => 100000,
|
|
'status_id' => 1,
|
|
'creator_id' => function () {
|
|
return factory(User::class)->create()->id;
|
|
},
|
|
];
|
|
});
|