reportsOf()->delete(); }); } /** Context data table */ public function table() { return $this->belongsTo(Table::class); } /** Parent comment (that we reply to; can be null) */ public function ancestor() { return $this->belongsTo(TableComment::class, 'ancestor_id'); } /** Replies to this comment */ public function replies() { return $this->hasMany(TableComment::class, 'ancestor_id'); } /** Authoring user */ public function author() { return $this->belongsTo(User::class, 'author_id'); } }