Delete an item.

@method DELETE
url /v1/controller/{id}

@param mixed $id

@return \Phalcon\Http\Response
@throws \Exception
965718
public function delete($id): Response
    {
        if ($objectInfo = $this->model->findFirst($id)) {
            if ($objectInfo->delete() === false) {
                foreach ($objectInfo->getMessages() as $message) {
                    throw new Exception($message);
                }
            }

            return $this->response(['Delete Successfully']);
        } else {
            throw new Exception(_('Record not found'));
        }
    }
730947
public function remove(string $id)
    {
        $url = self::$base_url.'/'.$id;

        return self::$curl->delete($url);
    }
226340
public function delete($id)
    {
        try {
            $this->roleRepositoryInterface->delete($id);
        } catch (RolesException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('roles.index');
        }

        Flash::success(trans('dashboard::dashboard.flash.role.delete.success'));

        return redirect()->route('roles.index');
    }
358265
public function destroy($id)
    {
        $this->roles->findOrFail($id)->delete();
        return \Redirect::route('admin.roles.index', [
         ])->withMessage(trans('acl::role.roles-controller-successfully_deleted'));
    }
118927
public function deleteAction($id)
    {
        $documentManager = $this->getDocumentManager();
        $document = $documentManager->find($id);
        $documentManager->remove($document);
        $documentManager->flush();

        return $this->handleView($this->view(null));
    }
539176
public function delete($id)
    {
        try {
            $this->permissionRepositoryInterface->delete($id);
        } catch (PermissionsException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('permissions.index');
        }

        Flash::success(trans('dashboard::dashboard.flash.permission.delete.success'));

        return redirect()->route('permissions.index');
    }
732870
public function delete($id)
    {
        $supported = $this->isSupported('delete');

        return (true === $supported) ? $this->makeRequest($this->endpoint.'/'.$id.'/delete', array(), 'DELETE') : $supported;
    }
1318783
public function actionDelete($id)
    {
        $this->findModel($id)->delete();
        if (Yii::$app->request->getIsAjax()) {
            \Yii::$app->response->format = 'json';
            return ['success' => true];
        } else {
            return $this->redirect(['index']);
        }
    }
362344
public function destroy($id)
    {
        $scaffoldInterface = Scaffoldinterface::FindOrFail($id);

        $scaffoldInterface->delete();

        Session::flash('status', 'Deleted Successfully');

        return URL::to('scaffold');
    }
830952
public function deleteAction($id)
    {
        $targetGroup = $this->retrieveTargetGroupById($id);

        $this->getEntityManager()->remove($targetGroup);
        $this->getEntityManager()->flush();

        return $this->handleView($this->view(null, 204));
    }
275245
public function actionDelete($id)
    {
        $model = $this->findModel($id);
        Configs::authManager()->remove($model->item);
        Helper::invalidate();

        return $this->redirect(['index']);
    }
1219926
public function deleteAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $cron = $em->getRepository('OpiferCmsBundle:Cron')->find($id);

        $em->remove($cron);
        $em->flush();

        return $this->redirectToRoute('opifer_cms_cronjob_index');
    }
1011846
public function delete($id) {

		$bean = \R::findOne( $this->type, ' id = :id ', [ ':id' => $id ] );
		if ( !$bean ) {
			throw new \Exception('This '.$this->type.' does not exist.');
		}

		// Check for property type specific delete methods
		foreach ( $this->properties as $property ) {

			// Check if specific delete property method exists
			$c = new $property['type'];
			if ( method_exists( $c, 'delete' ) ) {
				$c->delete( $bean, $property );
			}

		}

		\R::trash( $bean );

	}
1302021
public
    function destory($id)
    {
        $row = Model::find($id);
        $row->delete();
        flash()->success('Your Item Deleted');
        return redirect()->to("/menus");
    }
156287
public function delete($id)
    {
        // Set the endpoint
        $endpoint = $this->buildEndpoint();

        $endpoint .= '/' . $id;

        // Set the header
        $this->buildHttpHeader();

        // Send the request
        $client = new Client(); //GuzzleHttp\Client

        try {

            $response = $client->request('DELETE', $endpoint, [
                'headers' => $this->headers,
                'curl' => $this->setGetCurlopts(),
            ]);

        } catch (\GuzzleException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;

        } catch (\GuzzleHttp\Exception\ClientException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        } catch (\GuzzleHttp\Exception\ServerException $e) {
            $this->errorMessage = $e->getResponse()->getBody()->getContents();
            return false;
        }

        return $results = json_decode($response->getBody(), true);
    }
1216058
public function delete($id)
    {
        $response = $this->restClient->delete($this->endpoint . '/' . $id);

        return $response['body'];
    }
100445
public function deleteAction($id)
    {
        $manager = $this->getTaskManager();
        $manager->remove($id);

        $this->getEntityManager()->flush();

        return $this->handleView($this->view());
    }