public function getMembers($groupId) { $groupMembers = GroupMember::findByGroupId($groupId); foreach ($groupMembers as $member) { $member->name = $member->getUserName(); } return Response::json($groupMembers); }
public function getMembers($groupId) { $groupMembers = GroupMember::findByGroupId($groupId); $group = Group::where('id', '=', $groupId)->first(); return View::make('groups.members.index', compact('groupMembers', 'group')); }