text(__(":sender gives key no :key to :recipient", [ "sender" => $this->getName($this->sender), "recipient" => $this->getName($this->recipient), "key" => $notifiable->id, ])); } protected function getName(User $user): string { if ($user->profile->slack_id !== null) { return "<@{$user->profile->slack_id}>"; } return $user->profile->full_name; } }