Skip to content

Commit

Permalink
Adding leftJoin to the docs.
Browse files Browse the repository at this point in the history
There was no entry for the leftJoin method.
  • Loading branch information
JesseObrien committed Sep 26, 2013
1 parent 895f33f commit ec771e5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion queries.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ The query builder may also be used to write join statements. Take a look at the
->join('orders', 'users.id', '=', 'orders.user_id')
->select('users.id', 'contacts.phone', 'orders.price');

**Left Join Statement**

DB::table('users')
->leftJoin('posts', 'users.id', '=', 'posts.user_id')
->get();

You may also specify more advanced join clauses:

DB::table('users')
Expand Down Expand Up @@ -279,4 +285,4 @@ You may easily cache the results of a query using the `remember` method:

$users = DB::table('users')->remember(10)->get();

In this example, the results of the query will be cached for ten minutes. While the results are cached, the query will not be run against the database, and the results will be loaded from the default cache driver specified for your application.
In this example, the results of the query will be cached for ten minutes. While the results are cached, the query will not be run against the database, and the results will be loaded from the default cache driver specified for your application.

0 comments on commit ec771e5

Please sign in to comment.