Last active
April 7, 2019 05:28
-
-
Save mehedithedue/9372e687326b3bd3461f6e49a197e0a3 to your computer and use it in GitHub Desktop.
Where (OR AND) by Closure Laravel Eloquent ORM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$variable = Modal::where(function ($query) use ($info) { | |
$query->where('column_one', $info) | |
->orWhere('column_two', $info) | |
->orWhere('status', 3); | |
}) | |
->where('deleted', 0) | |
->first(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment