Пример #1
0
 /**
  * Determine if player have guild
  *
  * @param int $playerId
  */
 public function isMember($playerId)
 {
     $guildMember = \App\Model\Member::join('guilds', 'guilds.id', '=', 'guild_members.guild')->find($playerId);
     return $guildMember ? $guildMember->name : '';
 }
Пример #2
0
 /**
  * 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'));
 }