laravel/framework — pull request #4440 by jarektkaczyk (2014-05-19 09:46:27+00:00)
Title: Fix select clause on belongsToMany relation

Tiny fix on BelongsToMany relation addressing #2679.

Let's you do this:

```
// User model, belongsToMany('Category')

$user->categories()->select('name', updated_at')->get();
// or
public function categoriesAnotherRelation()
{
return $this->belongsToMany('Category')->select('name', 'updated_at');
}

// resulting query:
// 'SELECT name, updated_at, pivot_fields... '
// instead of:
// 'SELECT name, updated_at, categories.*, pivot_fields... '
```