/** * Show the form for editing the specified resource. * GET /medications/{id}/edit * * @param int $id * @return Response */ public function edit($id) { $test_items = Billing::select('id', 'item')->where('type', '=', 'Laboratory Test')->get(); $prescription_items = Billing::select('id', 'item')->where('type', '=', 'Medication')->get(); $medication = Medication::find($id); $test = Test::find($id); return View::make('medications.edit', compact('medication', 'test_items', 'prescription_items', 'test')); }