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