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