/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { $user = User::findWithPermission($id); $inductions = $this->equipmentRepository->getRequiresInduction(); $userInductions = $user->inductions()->get(); foreach ($inductions as $i => $induction) { $inductions[$i]->userInduction = false; foreach ($userInductions as $userInduction) { if ($userInduction->key == $induction->induction_category) { $inductions[$i]->userInduction = $userInduction; } } } //get pending address if any $newAddress = $this->addressRepository->getNewUserAddress($id); //Get the member subscription payments $subscriptionCharges = $this->subscriptionChargeRepository->getMemberChargesPaginated($id); return \View::make('account.show')->with('user', $user)->with('inductions', $inductions)->with('newAddress', $newAddress)->with('subscriptionCharges', $subscriptionCharges); }