/** * 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); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $requiresInduction = $this->equipmentRepository->getRequiresInduction(); $doesntRequireInduction = $this->equipmentRepository->getDoesntRequireInduction(); return \View::make('equipment.index')->with('requiresInduction', $requiresInduction)->with('doesntRequireInduction', $doesntRequireInduction); }