/** * Show guilds ladder * GET * * @return Response */ public function ShowGuilds() { $guilds = Cache::remember('ladderGuilds', 60, function () { return GuildManager::orderBy('xp', 'desc')->take(50)->get(); }); return view('ladder.guilds', compact('guilds')); }
/** * Show guild ladder * GET * * @return Response */ public function showGuild() { $guilds = Cache::remember('ladderGuild', 60, function () { return GuildManager::orderBy('xp', 'desc')->take(config('config.ladder_limit'))->get(); }); return view('ladder.guild', compact('guilds')); }
/** * Show guild's members page * GET * * @param int $name * @param string $name * @return Response */ public function ShowGuildMembers($id, $name) { $guild = GuildManager::find($id); $members = GuildMemberManager::join('personnages', 'personnages.guid', '=', 'guild_members.guid')->where('guild', $guild->id)->orderBy('rank', 'asc')->paginate(20); $countMembers = GuildMemberManager::where('guild', $guild->id)->count(); return view('directories.guild_members', compact('guild', 'members', 'countMembers')); }