diff --git a/src/ChatifyMessenger.php b/src/ChatifyMessenger.php index 617f472..d9a357e 100644 --- a/src/ChatifyMessenger.php +++ b/src/ChatifyMessenger.php @@ -377,7 +377,7 @@ public function deleteConversation($user_id) public function deleteMessage($id) { try { - $msg = Message::where('from_id', auth()->id())->where('id', $id)->fristOrFail(); + $msg = Message::where('from_id', auth()->id())->where('id', $id)->firstOrFail(); if (isset($msg->attachment)) { // delete file attached if exist $path = config('chatify.attachments.folder') . '/' . json_decode($msg->attachment)->new_name;