图片搜索增加IP匹配

This commit is contained in:
Wisp X
2019-05-07 14:23:27 +08:00
parent e5d1c3f7a1
commit 96d241ff19
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ class User extends Base
$model = $this->user->images()->order('create_time', 'desc');
$folders = $this->user->folders()->where('parent_id', $folderId)->select();
if (!empty($keyword)) {
$model = $model->where('pathname', 'like', "%{$keyword}%");
$model = $model->where('pathname|sha1|md5|ip', 'like', "%{$keyword}%");
}
if (is_numeric($folderId)) {
$model = $model->where('folder_id', $folderId);
@@ -46,7 +46,7 @@ class Images extends Base
$model = $model->where($field, $value);
}
if (!empty($keyword)) {
$model = $model->where('pathname|sha1|md5', 'like', "%{$keyword}%");
$model = $model->where('pathname|sha1|md5|ip', 'like', "%{$keyword}%");
}
$images = $model->order('id', 'desc')->paginate($limit, false, [
'query' => [