public function view($playerId) { $user = User::firstOrNew(['id' => $playerId]); $this->_updateUser($user, true); // Get total users $cache = new UsersCountCache(); $usersCount = $cache->retrieve(); // Title $title = $user->name; if ($user->real_name) { $title .= ' (' . $user->real_name . ')'; } $this->layout()->setData('title', $title); return new UserView($user, $usersCount); }
protected function _getUsersCount() { $cache = new UsersCountCache(); return $cache->retrieve(); }