messages chat view

This commit is contained in:
amazuecos
2024-11-28 16:07:11 +01:00
parent 093aa42e67
commit c1aecb43f2
16 changed files with 661 additions and 396 deletions

View File

@ -48,4 +48,15 @@ class ChatNotification extends Model
protected $beforeDelete = [];
protected $afterDelete = [];
public function isChatMessageViewed(int $chat_message_id) : bool
{
$status = false;
$count = $this->where("chat_message_id",$chat_message_id)->where("viewed",false)->countAllResults();
if($count>0){
$status = false;
}else{
$status = true;
}
return $status;
}
}