From 43afc7b9fac2fba5852e06bd03e82af393a14197 Mon Sep 17 00:00:00 2001 From: Dave Clayton Date: Tue, 12 Feb 2013 14:54:13 +0100 Subject: [PATCH] Made how to do AND WHERE in fluent more explicit in the docs --- laravel/documentation/database/fluent.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/laravel/documentation/database/fluent.md b/laravel/documentation/database/fluent.md index 307488ea..adede66e 100644 --- a/laravel/documentation/database/fluent.md +++ b/laravel/documentation/database/fluent.md @@ -76,6 +76,13 @@ ### where and or\_where ->or_where('email', '=', 'example@gmail.com') ->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**: return DB::table('users')