/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // $pet = Pet::findOrFail($id); $records = $this->records->forPet($pet); return view('pets.show', ['pet' => $pet, 'records' => $records]); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update($id, $cid, CreatePetRequest $request) { $pet = Pet::findOrFail($cid); $pet->update($request->all()); }