public function show($id) { $user = User::findOrFail($id); if (\Auth::guest() && $user->profile_private) { return \Response::make('', 404); } $profileData = $this->profileRepo->getUserProfile($id); $userSkills = array_intersect_ukey($this->profileSkillsRepository->getAll(), array_flip($profileData->skills), [$this, 'key_compare_func']); return \View::make('members.show')->with('user', $user)->with('profileData', $profileData)->with('userSkills', $userSkills); }