Hi guys!!
I need to do this query on eloquent:
Select * from my_table where field_a + field_b in (2,5,......);
where field_a and field_b are integer values. I searched the web, but I did not find any results;
Thanks!!
? myModel::whereRaw('field_a + field_b in (2,5,......)');
http://laravel.com/api/5.1/Illuminate/Database/Query/Builder.html#method_whereRaw
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community