Merge pull request #1400 from sdbondi/develop
Ref #649 - Added documentation for where_between suite of methods (Ref Pull #1365)
This commit is contained in:
@@ -121,6 +121,26 @@ The suite of **where_null** methods makes checking for NULL values a piece of ca
|
|||||||
->or_where_not_null('updated_at')
|
->or_where_not_null('updated_at')
|
||||||
->get();
|
->get();
|
||||||
|
|
||||||
|
### where\_between, where\_not\_between, or\_where\_between, and or\_where\_not\_between
|
||||||
|
|
||||||
|
The suite of **where_between** methods makes checking if values fall BETWEEN a minimum and maximum super easy :
|
||||||
|
|
||||||
|
return DB::table('users')->where_between($column, $min, $max)->get();
|
||||||
|
|
||||||
|
return DB::table('users')->where_between('updated_at', '2000-10-10', '2012-10-10')->get();
|
||||||
|
|
||||||
|
return DB::table('users')->where_not_between('updated_at', '2000-10-10', '2012-01-01')->get();
|
||||||
|
|
||||||
|
return DB::table('users')
|
||||||
|
->where('email', '=', 'example@gmail.com')
|
||||||
|
->or_where_between('updated_at', '2000-10-10', '2012-01-01')
|
||||||
|
->get();
|
||||||
|
|
||||||
|
return DB::table('users')
|
||||||
|
->where('email', '=', 'example@gmail.com')
|
||||||
|
->or_where_not_between('updated_at', '2000-10-10', '2012-01-01')
|
||||||
|
->get();
|
||||||
|
|
||||||
<a name="nested-where"></a>
|
<a name="nested-where"></a>
|
||||||
## Nested Where Clauses
|
## Nested Where Clauses
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user