ramzes, в твоём варианте вообще нет ничего сложного, я так понимаю там выборка тем с автором последнего сообщения.
class Thread extends Model {
public function closing() {
return $this->belongsTo(User::class, 'last_post_author');
}
}
Thread::with('closing')
->where(function($q) {
$q->where('parent_id', 4)->where('thread_fixed', 1);
})->or('about, 1)
->order('thread_fixed', 'DESC')
->order('last_time', 'DESC')
->limit(800, 20)
->get();