hookable
hookable copied to clipboard
Check number of parameters passed to where function
Step to reproduce the problem: pass only 2 parameters to where method, the second one must be a string containing a valid SQL operator. Something like this:
$model->where('id', '<>');
This will make a query like this:
select * from table where id is not null
Where method should check the number of parameters passed and pack inside the $bag only the ones passed by the user, as eloquent already have default values for those how are missing, or skip the first check that verify if $operator is a valid SQL operator if there are only 2 parameters.