added lists() method to the fluent documentation

This commit is contained in:
Oliver Vogel 2012-12-06 20:44:39 +01:00
parent 8ff052cbdb
commit 3e4eb5fc3d
1 changed files with 6 additions and 0 deletions

View File

@ -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();