How to use Laravel Eloquent ORM
to make an OR
statement?
I know I can make multiple select like this (AND)
Order::where('id', '<', $myid)->where('finance','ok')->get();
How to use Laravel Eloquent ORM
to make an OR
statement?
I know I can make multiple select like this (AND)
Order::where('id', '<', $myid)->where('finance','ok')->get();
Order::where('id', '<', $myid)->orWhere('finance','ok')->get();
That gives you the OR
http://laravel.com/docs/queries#advanced-wheres gives you more details but it's the orWhere
that is interesting to us here.