From 3e4eb5fc3d0f1ffad4e1faeddde680ad79be0767 Mon Sep 17 00:00:00 2001 From: Oliver Vogel Date: Thu, 6 Dec 2012 20:44:39 +0100 Subject: [PATCH] added lists() method to the fluent documentation --- laravel/documentation/database/fluent.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/laravel/documentation/database/fluent.md b/laravel/documentation/database/fluent.md index ceeb809b..1be2afde 100644 --- a/laravel/documentation/database/fluent.md +++ b/laravel/documentation/database/fluent.md @@ -53,6 +53,12 @@ #### Only selecting certain columns from the database: $user = DB::table('users')->get(array('id', 'email as user_email')); +#### Retrieving an array with the values of a given column: + + $users = DB::table('users')->take(10)->lists('email', 'id'); + +> **Note:** Second parameter is optional + #### Selecting distinct results from the database: $user = DB::table('users')->distinct()->get();