SQLSTATE[HY000]: General error: 3065 Expression #1 of ORDER BY clause is not in SELECT list, references column 'messages.created_at' which is not in SELECT list; this is incompatible with DISTINCT
how to sove
$MsgChecker = Message::where('receiver_id', '!=', Auth::id())->where('user_id', '=', Auth::id())->select('user_id', 'receiver_id', 'conversation_token')->orderBy('created_at','asc')->distinct()->get();
Please sign in or create an account to participate in this conversation.
There's no shortage of content at Laracasts. In fact, you could watch nonstop
for days upon days, and still not see everything!