User::withExists([
'posts as is_author',
'posts as is_tech_author' => function ($query) {
return $query->where('category', 'tech');
},
'comments',
])->select([... some fields to select ...])->get();
the ->select() call needs to be before ->withExists call
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
This syntax will not work for some reasons :
the ->select() call needs to be before ->withExists call