messages view

This commit is contained in:
amazuecos
2024-11-28 09:14:59 +01:00
parent 3400c5f77c
commit 093aa42e67
23 changed files with 1030 additions and 19 deletions

View File

@ -46,4 +46,12 @@ class ChatUser extends Model
protected $afterFind = [];
protected $beforeDelete = [];
protected $afterDelete = [];
public function getChatUserArrayId(int $chat_id) : array
{
$queryResult = $this->builder()
->select(['chat_users.user_id'])
->where("chat_users.chat_id",$chat_id)
->get()->getResultObject();
return array_map(fn($q) => $q->user_id,$queryResult);
}
}