/** * Get the squash ladder as an array from database. * @return array object */ private function the_ladder() { return $ladder = Result::groupBy('player_id')->orderBy('points', 'desc')->selectRaw('player_id, sum(points) as points')->get(); }