Remove the specified resource from database.

@param int $id            Id of the content
@param int $translationId Id of the content translation

@return \Illuminate\Http\JsonResponse
965593
public function destroy($id, $translationId)
    {
        $content = $this->getContent($id);
        if (!empty($content)) {
            $this->authorize('delete', $content);
            $translation = $this->repository->getContentTranslationById($content, $translationId);
            if (!empty($translation)) {
                $this->repository->deleteTranslation($translation);
                return $this->respondWithSimpleSuccess(['success' => true]);
            }
        }
        return $this->respondNotFound();
    }
1042154
public function show($id, $translationId)
    {
        $block = $this->getBlock($id);
        if (!empty($block)) {
            $this->authorize('read', $block);
            $translation = $this->repository->getBlockTranslationById($block, $translationId);
            if (!empty($translation)) {
                return $this->respondWithSuccess($translation, new BlockTranslationTransformer);
            }
        }
        return $this->respondNotFound();
    }
1360034
public function destroy($id, $translationId)
    {
        $file = $this->getFile($id);
        if (!empty($file)) {
            $this->authorize('delete', $file);
            $translation = $this->repository->getTranslationById($file, $translationId);
            if (!empty($translation)) {
                $this->repository->deleteTranslation($translation);
                return $this->respondWithSimpleSuccess(['success' => true]);
            }
        }
        return $this->respondNotFound();
    }
215988
public function delete(string $id = null)
    {
        $this->request->allowMethod(['post', 'delete']);
        $translation = $this->Translations->get($id);
        if ($this->Translations->delete($translation)) {
            $this->Flash->success((string)__('The translation has been deleted.'));
        } else {
            $this->Flash->error((string)__('The translation could not be deleted. Please, try again.'));
        }

        return $this->redirect(['action' => 'index']);
    }
1034194
protected function removeTranslation($parentId, $textMD5, $languageId)
    {
        /** @var $query \eZ\Publish\Core\Persistence\Database\UpdateQuery */
        $query = $this->dbHandler->createUpdateQuery();
        $query->update(
            $this->dbHandler->quoteTable($this->table)
        )->set(
            $this->dbHandler->quoteColumn('lang_mask'),
            $query->expr->bitAnd(
                $this->dbHandler->quoteColumn('lang_mask'),
                $query->bindValue(~$languageId, null, \PDO::PARAM_INT)
            )
        )->where(
            $query->expr->lAnd(
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('parent'),
                    $query->bindValue($parentId, null, \PDO::PARAM_INT)
                ),
                $query->expr->eq(
                    $this->dbHandler->quoteColumn('text_md5'),
                    $query->bindValue($textMD5, null, \PDO::PARAM_STR)
                )
            )
        );
        $query->prepare()->execute();
    }
840663
public function deleteAction($id)
    {
        $this->checkCsrf();

        $transUnit = $this->get('lexik_translation.translation_storage')->getTransUnitById($id);

        if (!$transUnit) {
            throw $this->createNotFoundException(sprintf('No TransUnit found for id "%s".', $id));
        }

        $deleted = $this->get('lexik_translation.trans_unit.manager')->delete($transUnit);

        return new JsonResponse(array('deleted' => $deleted), $deleted ? 200 : 400);
    }
1206088
public function remove($parentId, $id)
    {
        $resource = $this->createPartialResourceUrlForView($parentId, $id);
        $this->client->delete($resource);
    }
446357
public function remove($id)
    {
        try {
            return $this->resource->hDel(static::CACHE_KEY, $id);
        } catch (ConnectionException $e) {
            return false;
        }
    }
1166631
public function removeBlockAction($id)
    {
        /** @var BlockManager $manager */
        $manager  = $this->get('opifer.content.block_manager');
        $response = new JsonResponse;

        try {
            $block = $manager->find($id, true);
            $manager->remove($block, true);
            $response->setData(['state' => 'removed']);
        } catch (\Exception $e) {
            $response->setStatusCode(500);
            $response->setData(['error' => $e->getMessage()]);
        }

        return $response;
    }
1244441
public function remove($name, $id)
    {
        $this->client->remove(
            $this->capabilities->get($name)->getUrl() . (string) $id
        );

        return $this;
    }
1098242
public function show($id, $translationId)
    {
        $content = $this->getContent($id);
        if (!empty($content)) {
            $this->authorize('read', $content);
            $translation = $this->repository->getContentTranslationById($content, $translationId);
            if (!empty($translation)) {
                return $this->respondWithSuccess($translation, new ContentTranslationTransformer);
            }
        }
        return $this->respondNotFound();
    }
854915
public function remove($id)
    {
        try {
            return $this->resource->delete([
                'index' => $this->schema->getName(),
                'type' => static::INDEX_TYPE,
                'id' => $id
            ]);
        } catch (NoNodesAvailableException $e) {
            return false;
        }
    }
1179786
public function destroy($id)
    {
        $this->user->delete($id);

        flash(trans('core::messages.resource.resource deleted', ['name' => trans('user::users.title.user')]));

        return redirect()->route('backend::user.user.index');
    }
1298670
public function destroy($id)
    {
        $campagne = $this->campagne->find($id);
        $campagne->content()->delete();
        
        $this->campagne->delete($id);

        alert()->success('Campagne supprimée');

        return redirect()->back();
    }
424514
public static function destroy($id)
    {
        return Symphony::Database()->query(
            sprintf(
                "DELETE
                FROM `tbl_sessions`
                WHERE `session` = '%s'",
                Symphony::Database()->cleanValue($id)
            )
        );
    }
39980
public function delete($lang, $id)
    {
        if(!User::hasAccess('Categories', 'delete')) {
            return $this->noPermission();
        }

        $categoryDeleteRes = $this->deleteCategory($id);
        if(gettype($categoryDeleteRes) == "boolean") {
            if($categoryDeleteRes) {
                return $this->response('Category could not be deleted.', 500);
            }
        }else{
            return $categoryDeleteRes;
        }

        return $this->response('Category could not be deleted. Please try again later or contact your Administrator!', 500);
    }
1134190
public function destroy($memberId, $id)
    {
        $memberTag = MemberTag::findOrFail($id);
        $this->authorize('detachMember', [$memberTag, $memberId]);
        /** @noinspection PhpUndefinedMethodInspection */
        $memberTag->members()->detach($memberId);
        return fractal($memberTag->id, new DeletedTransformer())
            ->withResourceName('deletedMemberTag')
            ->respond();
    }