belongsTo(Blog::class); } /** * Get the user that owns the comment. */ public function user(): BelongsTo { return $this->belongsTo(User::class); } /** * Get the parent comment (for replies). */ public function parent(): BelongsTo { return $this->belongsTo(BlogComment::class, 'parent_id'); } /** * Get all replies including nested ones. */ public function replies(): HasMany { return $this->hasMany(BlogComment::class, 'parent_id')->with('replies'); } }