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