I have the following code that does not work:
$threads = MessageThread::with('last_message', 'thread_visibility') ->where('message_thread_visibility.user_id', Auth::user()->id)->get();
What is the best way to add a "where" clause to an eagerly loaded eloquent query in Laravel?
source share