update:更新搜索

This commit is contained in:
JaguarJack 2020-09-02 20:46:30 +08:00
parent 0e3656c7cc
commit e0007d4150

View File

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