改进模型

This commit is contained in:
Wisp X
2022-02-25 09:25:44 +08:00
parent c1de4d03d0
commit 27ccdb4c73
9 changed files with 27 additions and 5 deletions
@@ -63,7 +63,7 @@ class ImageController extends Controller
});
foreach ($words as $word) {
$builder->whereRaw("concat(origin_name,alias_name) like ?", ["%{$word}%"]);
$builder->where('origin_name', 'like', "%{$word}%")->orWhere('alias_name', 'like', "%{$word}%");
}
})->latest()->paginate(40);
$images->getCollection()->each(function (Image $image) {