The title says it all.
I get that I can do this :
DB::table('items')->where('something', 'value')->get()
But what I want to check the where condition for multiple values like so:
DB::table('items')->where('something', 'array_of_value')->get()
Is there an easy way of doing this?
There's whereIn()
:
$items = DB::table('items')->whereIn('id', [1, 2, 3])->get();