diff --git a/README.md b/README.md index 921bb1f..bc37e99 100644 --- a/README.md +++ b/README.md @@ -547,7 +547,7 @@ class Post extends Model public function commentReplies() { - return $this->hasManyDeep(Comment::class, ['App\Comment as alias'], [null, 'parent_id']); + return $this->hasManyDeep(Comment::class, [Comment::class . ' as alias'], [null, 'parent_id']); } } ``` @@ -570,7 +570,7 @@ class User extends Model public function permissions() { - return $this->hasManyDeep(Permission::class, ['App\RoleUser as alias', Role::class]); + return $this->hasManyDeep(Permission::class, [RoleUser::class . ' as alias', Role::class]); } }