You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want use distinct
$messages = ChatMessage::where('user_to', $user->id)
->where('created_at', '>=', new \DateTime('-3 day'))
->distinct('user_id')
->get();
I hope $messages is a array Collection "ChatMessage" but result only "user_id"
This discussion was converted from issue #1684 on September 04, 2020 20:09.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I want use distinct
$messages = ChatMessage::where('user_to', $user->id)
->where('created_at', '>=', new \DateTime('-3 day'))
->distinct('user_id')
->get();
I hope $messages is a array Collection "ChatMessage" but result only "user_id"
Beta Was this translation helpful? Give feedback.
All reactions