Skip to content

Commit 4112ab5

Browse files
committed
Sort urls by creation date in descendant order
1 parent 684d217 commit 4112ab5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Http/Controllers/UrlController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class UrlController extends Controller
1616
*/
1717
public function index()
1818
{
19-
$urls = Url::paginate(config('shorturl.items_per_page'));
19+
$urls = Url::orderBy('created_at', 'desc')->paginate(config('shorturl.items_per_page'));
2020

2121
return view('shorturl::urls.index', compact('urls'));
2222
}

0 commit comments

Comments
 (0)