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