/** * Remove the specified Bill from storage. * * @param int $id * * @return Response */ public function destroy($id) { $bill = $this->billRepository->find($id); if (empty($bill)) { Flash::error('Bill not found'); return redirect(route('bills.index')); } $this->billRepository->delete($id); Flash::success('Bill deleted successfully.'); return redirect(route('bills.index')); }
/** * Remove the specified Bill from storage. * DELETE /bills/{id} * * @param int $id * * @return Response */ public function destroy($id) { $this->billRepository->apiDeleteOrFail($id); return $this->sendResponse($id, "Bill deleted successfully"); }