+ /**
+ * Get the parent comment this is in reply to (if existing).
+ */
+ public function parent(): BelongsTo
+ {
+ return $this->belongsTo(Comment::class, 'parent_id', 'local_id', 'parent')
+ ->where('entity_type', '=', $this->entity_type)
+ ->where('entity_id', '=', $this->entity_id);
+ }
+