laravel/framework — pull request #1146 by harhoo (2013-05-02 10:39:56+00:00)
Title: Add union method to Query Builder

This adds a union() method to query builder to allow for unions.

Usage:

```php
$users = DB::table('users')->where('user', 'like', '%foo%');
$users2 = DB::table('users_2012')->where('name', 'like', '%bar%')->union($users);
$users3 = DB::table('users_2013')->where('name', 'like', '%baz%')->union($users2)->get();
```
By default it does UNION ALL, but if you pass FALSE as the second parameter to union() it just does UNION