Skip to content

Commit

Permalink
order by desck
Browse files Browse the repository at this point in the history
  • Loading branch information
xlcrr committed Mar 3, 2024
1 parent 163ee6d commit 63672db
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function __invoke (): JsonResponse
$tags = CustomTag::where('tag', 'like', $search . '%')
->select('tag', DB::raw('count(*) as total'))
->groupBy('tag')
->orderBy('total', 'desc')
->limit(20)
->get();

Expand Down

0 comments on commit 63672db

Please sign in to comment.