/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function ConfirmDelete($id) { # Get the Officer to be deleted $officer = \App\Officer::findOrFail($id); return view('pages.officer.delete', compact('officer')); }
/** * Display the specified officer. * * @Get("/{id}") * @Transaction( * @Response(200, body={"id": 1, "member_id": 1, "term_id": 1, * "title": "President", "position": "president", * "email": "*****@*****.**", "url": "/officers/1"}), * @Response(404, body={"error": "not found"}) * ) * @param int $id * @return Response */ public function show($id) { try { $officer = Officer::findOrFail($id); return response()->json($officer); } catch (ModelNotFoundException $e) { return new JsonResponse(['error' => 'not found'], Response::HTTP_NOT_FOUND); } }