mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
messages chat view
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user