How to write multiple where conditions in single where condition in laravel?



I am using multiple where conditions in my query it’s working fine but i need to refactor the code is there any way to write both conditions in one where condition..



Pass array of conditions to the where function.


As per Doc :

pass an array of conditions to the where function. Each element of the
array should be an array containing the three arguments typically
passed to the where method


Answered By – John Lobo

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave A Reply

Your email address will not be published.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More