We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7dd34d5 commit b0050f9Copy full SHA for b0050f9
module/Blog/Api/Controller/BlogController.php
@@ -211,7 +211,7 @@ public function get()
211
212
$recordNext = Blog::published()
213
->where('id', '>', $record['id'])
214
- ->orderBy('id', 'desc')
+ ->orderBy('id', 'asc')
215
->limit(1)->first();
216
if ($recordNext) {
217
$recordNext = ArrayUtil::keepKeys($recordNext->toArray(), ['id', 'title']);
@@ -220,7 +220,7 @@ public function get()
220
221
$recordPrev = Blog::published()
222
->where('id', '<', $record['id'])
223
- ->orderBy('id', 'asc')
+ ->orderBy('id', 'desc')
224
225
if ($recordPrev) {
226
$recordPrev = ArrayUtil::keepKeys($recordPrev->toArray(), ['id', 'title']);
0 commit comments