belongsTo(Post::class); } /** * Get the user that authored the comment. * If the user is not found, return a default guest author. * * @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class)->withDefault([ 'name' => 'Guest Author', ]); } }