diff --git a/README.md b/README.md index 6949079..53dedf7 100644 --- a/README.md +++ b/README.md @@ -436,9 +436,9 @@ Assuming that `Post` class has `createComment` method: ```php class Post extends Model { - public function createComment(array $comment) + public function createComment(array $attributes) { - return $this->comments()->create($comment); + return $this->comments()->create($attributes); } } ``` diff --git a/tests/TestingTools/fixture/app/Post.php b/tests/TestingTools/fixture/app/Post.php index 70ebd56..10a8773 100644 --- a/tests/TestingTools/fixture/app/Post.php +++ b/tests/TestingTools/fixture/app/Post.php @@ -14,8 +14,8 @@ public function comments() return $this->hasMany(Comment::class); } - public function createComment(array $comment) + public function createComment(array $attributes) { - return $this->comments()->create($comment); + return $this->comments()->create($attributes); } }