fixed bug

This commit is contained in:
JaguarJack 2020-11-21 12:33:55 +08:00
parent 21c1df4f69
commit 04a7818608

View File

@ -118,7 +118,8 @@ class CatchQuery extends Query
foreach ($params as $field => $value) {
$method = 'search' . Str::studly($field) . 'Attr';
if ($value !== null && method_exists($this->model, $method)) {
// value in [null, '']
if ($value !== null && $value !== '' && method_exists($this->model, $method)) {
$this->model->$method($this, $value, $params);
}
}