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