Skip to content

Commit

Permalink
order by
Browse files Browse the repository at this point in the history
  • Loading branch information
PavlosIsaris committed Dec 18, 2024
1 parent da45e5c commit 504620b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getActiveProjectsForHomePage(
}

// Combine the results of both queries, remove duplicates, and order by the most recent one
return $builder1->union($builder2)->distinct('id')->orderBy('created_at', 'desc')->get();
return $builder1->union($builder2)->distinct('id')->orderBy('updated_at', 'desc')->get();
}

/**
Expand Down

0 comments on commit 504620b

Please sign in to comment.