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