hookable icon indicating copy to clipboard operation
hookable copied to clipboard

Check number of parameters passed to where function

Open michi-7 opened this issue 3 years ago • 0 comments

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.

michi-7 avatar Apr 18 '22 20:04 michi-7