Answer the question
In order to leave comments, you need to log in
How to avoid join with subqueries if they are needed?
Simple Laravel example:
Model::landingSelectTableColumns() // select filter, laravel scope
->where(...)
->where(...)
->where(...)
->where(...)
->where(...)
->where(...)
->join(...)
->join(...)
->join(...)
->join(..., function ($join) use (...) {
$join->on(...)
->where(...);
})
->orderByDesc(...)
->orderByDesc(...)
->orderByDesc(...)
->orderByDesc(...)
->orderByDesc(...)
->limit(...)
->get();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question