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