diff --git a/README.md b/README.md index 01167a9..c2e6a53 100644 --- a/README.md +++ b/README.md @@ -135,8 +135,13 @@ This will prevent any method name conflicts with core, your custom or other trai ```php \Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertExists($model); \Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertSame($model, \App\Models\User::first()); -\Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertRelated($post, $comment, 'comments'); -\Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertRelated($post, \App\Models\Comment::class, 'comments', \Illuminate\Database\Eloquent\Relations\HasMany::class); +\Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertRelated($post, 'comments', $comment); +\Astrotomic\PhpunitAssertions\Laravel\ModelAssertions::assertRelated( + $post, + 'comments', + \App\Models\Comment::class, + \Illuminate\Database\Eloquent\Relations\HasMany::class +); ``` ### Blade