Skip to content

Commit

Permalink
[Docs fix] Factory::_real() instead Factory::object() (#759)
Browse files Browse the repository at this point in the history
Relying on docs I was trying to call such a method as "Factory::object()" but there was no this method.

Maybe the "Factory::_real()" was ment
  • Loading branch information
GrinWay authored Dec 17, 2024
1 parent d1240b1 commit ff7210a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ The following assumes the ``Comment`` entity has a many-to-one relationship with
$post = PostFactory::createOne(); // instance of Proxy

CommentFactory::createOne(['post' => $post]);
CommentFactory::createOne(['post' => $post->object()]); // functionally the same as above
CommentFactory::createOne(['post' => $post->_real()]); // functionally the same as above

// Example 2: pre-create Posts and choose a random one
PostFactory::createMany(5); // create 5 Posts
Expand Down

0 comments on commit ff7210a

Please sign in to comment.