How can I build has single query in laravel -
$tadaydate = ddate('m/d/y'); $value1 = value_table::where('value_1', $tadaydate)->get(); $value2 = value_table::where('value_2', $tadaydate)->get(); $value3 = value_table::where('value_3', $tadaydate)->get(); $value4 = value_table::where('value_4', $tadaydate)->get(); $value5 = value_table::where('value_5', $tadaydate)->get();
is there chance check single query?
you can use "->wherein()" function believe.
$value_array = ['value1',...,'value5']; $value_table->wherein($tadaydate, $value_array)->get;
Comments
Post a Comment