Magento, Laravel, Eloquent.
using where() clauses with multiple conditions. Instead, use whereHas() or whereDoesntHave() clauses to filter related data. Avoid using orderBy() clauses with multiple columns. Instead, use orderByDesc() or orderByAsc() clauses to order by a single column. Select only the columns you need One way