Skip to content

Commit

Permalink
Merge pull request #5 from Weebly/feature-closure-support
Browse files Browse the repository at this point in the history
Closure support
  • Loading branch information
elliotfehr committed Sep 20, 2017
2 parents 8b6d2e3 + 82d9e38 commit 60cc639
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Database/EloquentBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Weebly\Mutate\Database;

use Closure;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Builder;

Expand All @@ -17,6 +18,10 @@ class EloquentBuilder extends Builder
*/
public function where($column, $operator = null, $value = null, $boolean = 'and')
{
if ($column instanceof Closure) {
return parent::where($column, $operator, $value, $boolean);
}

if (func_num_args() === 2) {
$value = $operator;
$operator = '=';
Expand Down

0 comments on commit 60cc639

Please sign in to comment.