where('site_id', $value); } } public function searchStateAttr($query, $value, $data) { if (!empty($value)) { $query->where('state', $value); } } public function searchStatusAttr($query, $value, $data) { if (!empty($value)) { $query->where('status', $value); } } public function searchCreateTimeAttr($query, $value, $data) { if (!empty($value)) { $query->whereBetweenTime('create_time', $value[0], $value[1]); } } }