How can I build has single query in laravel -


table image

$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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -