✨ 完成相册筛选
This commit is contained in:
@@ -40,6 +40,8 @@ class ImageController extends Controller
|
||||
}
|
||||
})->when($request->query('keyword'), function (Builder $builder, $keyword) {
|
||||
$builder->whereRaw("concat(IFNULL(origin_name,''),IFNULL(alias_name,'')) like ?", ["%{$keyword}%"]);
|
||||
})->when((int) $request->query('album_id'), function (Builder $builder, $albumId) {
|
||||
$builder->where('album_id', $albumId);
|
||||
})->paginate(40);
|
||||
$images->getCollection()->each(function (Image $image) {
|
||||
$image->human_date = $image->created_at->diffForHumans();
|
||||
|
||||
Reference in New Issue
Block a user