/** * Display a listing of the resource. * * @return Response */ public function index() { // List all the active rejection reasons $rejection = RejectionReason::orderBy('reason', 'ASC')->get(); // Load the view and pass the reasons return View::make('specimenrejection.index')->with('rejection', $rejection); }
/** * Tests the update function in the SpecimenRejectionController */ public function testDelete() { Input::replace($this->rejectionReasonData); $rejectionReason = new SpecimenRejectionController(); $rejectionReason->store(); $rejectionReasonstored = RejectionReason::orderBy('id', 'desc')->take(1)->get()->toArray(); $rejectionReason->delete($rejectionReasonstored[0]['id']); $rejectionReasonDeleted = RejectionReason::find($rejectionReasonstored[0]['id']); $this->assertNull($rejectionReasonDeleted); }