Skip to content

Commit c283ac4

Browse files
author
Patrick
authored
[8.x] Using faker method instead of properties (#7043)
1 parent 93cb5cc commit c283ac4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

database-testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,8 @@ To define a relationship within your model factory, you will typically assign a
496496
{
497497
return [
498498
'user_id' => User::factory(),
499-
'title' => $this->faker->title,
500-
'content' => $this->faker->paragraph,
499+
'title' => $this->faker->title(),
500+
'content' => $this->faker->paragraph(),
501501
];
502502
}
503503

@@ -515,8 +515,8 @@ If the relationship's columns depend on the factory that defines it you may assi
515515
'user_type' => function (array $attributes) {
516516
return User::find($attributes['user_id'])->type;
517517
},
518-
'title' => $this->faker->title,
519-
'content' => $this->faker->paragraph,
518+
'title' => $this->faker->title(),
519+
'content' => $this->faker->paragraph(),
520520
];
521521
}
522522

0 commit comments

Comments
 (0)