Add sort by created_at method to the controller