where('DEVICE_NAME', 'like', '%'.$value.'%'); } /** * 根据imei搜索 */ public function searchShortCodeAttr($query, $value, $data) { return $query->where('DEVICE_CODE', 'like', '%'.$value.'%'); } }