Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 902974d

Browse files
committed
Merge branch '4.1'
2 parents 175948b + 4425edc commit 902974d

3 files changed

Lines changed: 14 additions & 2 deletions

File tree

src/Illuminate/Database/Eloquent/Builder.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,9 @@ public function where($column, $operator = null, $value = null, $boolean = 'and'
599599
}
600600
else
601601
{
602-
$this->query->where($column, $operator, $value, $boolean);
602+
return call_user_func_array(
603+
array($this->query, 'where'), array_slice(func_get_args(), 0, func_num_args())
604+
);
603605
}
604606

605607
return $this;

src/Illuminate/Http/Request.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,16 @@ public function instance()
2929
return $this;
3030
}
3131

32+
/**
33+
* Get the request method.
34+
*
35+
* @return string
36+
*/
37+
public function method()
38+
{
39+
return $this->getMethod();
40+
}
41+
3242
/**
3343
* Get the root URL for the application.
3444
*

tests/Database/DatabaseEloquentBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public function testQueryScopes()
347347
{
348348
$builder = $this->getBuilder();
349349
$builder->getQuery()->shouldReceive('from');
350-
$builder->getQuery()->shouldReceive('where')->once()->with('foo', 'bar', null, 'and');
350+
$builder->getQuery()->shouldReceive('where')->once()->with('foo', 'bar');
351351
$builder->setModel($model = new EloquentBuilderTestScopeStub);
352352
$result = $builder->approved();
353353

0 commit comments

Comments
 (0)