后台图片管理支持通过图片路径名称搜索。Fixed #640

This commit is contained in:
熊孝兵 2023-03-29 11:11:37 +08:00
parent fbb022c877
commit 05af7dffb8

View File

@ -64,7 +64,9 @@ class ImageController extends Controller
});
foreach ($words as $word) {
$builder->where('origin_name', 'like', "%{$word}%")->orWhere('alias_name', 'like', "%{$word}%");
$builder->where('name', 'like', "%{$word}%")
->where('origin_name', 'like', "%{$word}%")
->orWhere('alias_name', 'like', "%{$word}%");
}
})->latest()->paginate(40);
$images->getCollection()->each(function (Image $image) {