hasMany(Comment::class); } public function scoped_comments(): HasMany { // ScopedComment = Comment model with the BelongsToPrimaryModel trait return $this->hasMany(ScopedComment::class); } }