Sort our review items by id, to help reduce next page missing items

This commit is contained in:
Deon George 2024-10-07 16:30:23 +11:00
parent a8b7d1f5b5
commit b8f606b0f1
2 changed files with 3 additions and 1 deletions

View File

@ -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),

View File

@ -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');
}
/**