Skip to content

Commit

Permalink
Fix order direction handling for controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
Kovah committed Feb 5, 2024
1 parent 3cf7bbf commit 04c8b47
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/Guest/TagController.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public function show(Request $request, int $tagID): View
->publicOnly()
->orderBy(
$request->input('orderBy', 'title'),
$request->input('orderDir', 'asc')
$this->getOrderDirection($request, 'asc')
)->paginate(getPaginationLimit());

return view('guest.tags.show', [
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Controllers/Models/ListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function show(Request $request, LinkList $list): View
->byUser()
->orderBy(
$request->input('orderBy', 'created_at'),
$request->input('orderDir', 'desc')
$this->getOrderDirection($request)
)->paginate(getPaginationLimit());

return view('models.lists.show', [
Expand Down

0 comments on commit 04c8b47

Please sign in to comment.