Made how to do AND WHERE in fluent more explicit in the docs

This commit is contained in:
Dave Clayton 2013-02-12 14:54:13 +01:00
parent 23d23dd07c
commit 43afc7b9fa
1 changed files with 7 additions and 0 deletions

View File

@ -76,6 +76,13 @@ ### where and or\_where
->or_where('email', '=', 'example@gmail.com') ->or_where('email', '=', 'example@gmail.com')
->first(); ->first();
To do the equivalent of an AND where, simply chain the query with another where:
return DB::table('users')
->where('id', '=', 1)
->where('activated', '=', 1)
->first();
Of course, you are not limited to simply checking equality. You may also use **greater-than**, **less-than**, **not-equal**, and **like**: Of course, you are not limited to simply checking equality. You may also use **greater-than**, **less-than**, **not-equal**, and **like**:
return DB::table('users') return DB::table('users')