/** * Display a listing of all charges by the laboratory. * * @return Response */ public function index() { //List all Charges $charges = Charge::orderBy('name', 'ASC')->get(); //Load the view and pass the Charges return view('billing.charge.index', compact('charges')); }
/** * Tests the update function in the ChargeController * @param void * @return void */ public function testDestroy() { $this->withoutMiddleware(); $this->call('POST', '/charge', $this->chargeData); $chargeStored = Charge::orderBy('id', 'desc')->first(); $chargeStored->delete($chargeStored->id); $this->assertEquals(Charge::all()->count(), 0); }