From b8f606b0f1c20ff710fa3307ad2d08fce4d4f3ca Mon Sep 17 00:00:00 2001 From: Deon George Date: Mon, 7 Oct 2024 16:30:23 +1100 Subject: [PATCH] Sort our review items by id, to help reduce next page missing items --- app/Http/Controllers/PhotoController.php | 1 + app/Models/Abstracted/Catalog.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php index 3496506..c192dec 100644 --- a/app/Http/Controllers/PhotoController.php +++ b/app/Http/Controllers/PhotoController.php @@ -26,6 +26,7 @@ class PhotoController extends Controller 'catalog'=>is_null($id) ? Photo::where('remove',1) ->with(['software.model.make']) + ->orderBy('id') ->paginate($request->input('list',self::list_deletes)) : Photo::where('id',$id) ->paginate(1), diff --git a/app/Models/Abstracted/Catalog.php b/app/Models/Abstracted/Catalog.php index aa19ef7..4579216 100644 --- a/app/Models/Abstracted/Catalog.php +++ b/app/Models/Abstracted/Catalog.php @@ -100,7 +100,8 @@ abstract class Catalog extends Model { return $query->notRemove() ->where('duplicate',TRUE) - ->where(fn($q)=>$q->where('ignore_duplicate','<>',TRUE)->orWhereNull('ignore_duplicate')); + ->where(fn($q)=>$q->where('ignore_duplicate','<>',TRUE)->orWhereNull('ignore_duplicate')) + ->orderBy('id'); } /**