scalia/sphinxsearch — pull request #32 by tjoelsson (2014-09-17 03:44:05+00:00)
Title: Allow closures when eager loading

Eloquent allows adding constraints to eager loading like this:
```php
$users = User::with(array('posts' => function($query)
{
$query->where('title', 'like', '%first%');

}))->get();
```
The with() function takes either an array of strings or an associative array where keys are string names and values are closures. I've added this to the SphinxSearch class. Is there a good reason to reset the _eager_loads field each time you call with()?