1 $select->joinSub(
2 $selectSubQry,
3 'ag',
4 'ag.id',
5 '=',
6 'agp.userId'
7 );
1$users = User::join('posts', 'posts.user_id', '=', 'users.id')
2 ->join('comments', 'comments.post_id', '=', 'posts.id')
3 ->get(['users.*', 'posts.descrption']);
4