Answer the question
In order to leave comments, you need to log in
How to add a condition inside an eloquent query?
Is it possible to do this:
->select(...)
->where('one', 1)
>where('two', 2)
//Сюда добавить условие типа
if( 1 == 1 ) {
->where('three' , 3)
}
->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