/**
  * 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('specimenrejection.index')->with('rejection', $rejection);
 }
Example #2
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     // List all the active rejection reasons
     $rejections = RejectionReason::orderBy('reason', 'ASC')->get();
     // Load the view and pass the reasons
     return view('rejection.index', compact('rejections'));
 }
 /**
  * Tests the update function in the SpecimenRejectionController
  */
 public function testDelete()
 {
     $this->withoutMiddleware();
     $this->call('POST', '/specimenrejection', $this->rejectionReasonData);
     $rejectionReasonstored = RejectionReason::orderBy('id', 'desc')->first();
     $this->call('DELETE', '/specimenrejection/' . $rejectionReasonstored->id, $this->rejectionReasonData);
     $this->assertEquals(34, RejectionReason::all()->count());
 }