I recently learned about dynamic where clauses (I think that's what is called) in Laravel 4 Eloquent which makes where clauses like User::where('first_name', 'Jon')->get()
becomes nicer User::whereFirstName('Jon')->get()
. How flexible is this??
Can i for example do the following
- multiple columns
User::whereFirstNameOrLastName('Jon', 'Smith')->get();
- use operator other than
=
like>=
orLIKE