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.
19 lines
533 B
19 lines
533 B
<?php
|
|
|
|
use App\Entities\Projects\Comment;
|
|
use App\Entities\Projects\Project;
|
|
use App\Entities\Users\User;
|
|
use Faker\Generator as Faker;
|
|
|
|
$factory->define(Comment::class, function (Faker $faker) {
|
|
return [
|
|
'commentable_type' => 'projects',
|
|
'commentable_id' => function () {
|
|
return factory(Project::class)->create()->id;
|
|
},
|
|
'body' => $faker->sentence,
|
|
'creator_id' => function () {
|
|
return factory(User::class)->create()->id;
|
|
},
|
|
];
|
|
});
|