Commit 014fabb4 authored by Jens Segers's avatar Jens Segers

Let the builder pass the raw method, fixes #157

parent 1f9d27b5
......@@ -9,7 +9,7 @@ class Builder extends \Illuminate\Database\Eloquent\Builder {
*/
protected $passthru = array(
'toSql', 'lists', 'insert', 'insertGetId', 'pluck',
'count', 'min', 'max', 'avg', 'sum', 'exists', 'push', 'pull'
'count', 'min', 'max', 'avg', 'sum', 'exists', 'push', 'pull', 'raw'
);
}
......@@ -195,6 +195,9 @@ class QueryBuilderTest extends PHPUnit_Framework_TestCase {
$collection = DB::collection('users')->raw();
$this->assertInstanceOf('MongoCollection', $collection);
$collection = User::raw();
$this->assertInstanceOf('MongoCollection', $collection);
$results = DB::collection('users')->whereRaw(array('age' => 20))->get();
$this->assertEquals(1, count($results));
$this->assertEquals('Jane Doe', $results[0]['name']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment