Remove the specific record from the db
DELETE /{lookup table}/{id}

@param  int      $id
@return Response
171200
public function destroy($id)
    {
        // Is this user allowed to do this?
        if (!$this->repository->isUserAllowed('destroy'))
        {
            Session::flash('status_code', 400 );
            $message = "You are not allowed to delete ".$this->table_type_plural;
            Session::flash('message', $message);
            return view('formhandling::warnings/' . config('lasallecmsadmin.admin_template_name') . '/user_not_allowed', [
                'package_title'        => $this->package_title,
                'table_type_plural'    => $this->table_type_plural,
                'table_type_singular'  => $this->table_type_singular,
                'resource_route_name'  => $this->resource_route_name,
                'HTMLHelper'           => HTMLHelper::class,
            ]);
        }

        // Is this record not supposed to be deleted?
        if ($this->repository->doNotDelete($id))
        {
            Session::flash('status_code', 400 );
            $message = 'This '.$this->table_type_singular.' is a core lookup record, so you cannot delete it';
            Session::flash('message', $message);
            return Redirect::route('admin.'.$this->resource_route_name.'.index');
        }

        // Is this record locked?
        if ($this->repository->isLocked($id))
        {
            $message = 'This '.$this->table_type_singular.' is not available for deletion, as someone else is currently editing this '.$this->table_type_singular;
            Session::flash('message', $message);
            Session::flash('status_code', 400 );
            return Redirect::route('admin.'.$this->resource_route_name.'.index');
        }

        // Do other tables use this lookup table ID?
        // are there records that use this lookup table record?
        $foreignKeyChecks = $this->repository->foreignKeyChecks($id);
        foreach ($foreignKeyChecks as $foreignKeyCheck)
        {
            if ($foreignKeyCheck['count'] > 0)
            {
                $message = "Foreign key constraint! The table ".strtoupper($foreignKeyCheck['related_table'])." is using this record ".$foreignKeyCheck['count']." times. Can only delete this record when no other tables are using it.";
                Session::flash('message', $message);
                Session::flash('status_code', 400 );
                return Redirect::route('admin.'.$this->resource_route_name.'.index');
            }
        }
        $title = $this->repository->getFind($id)->title;;

        if ( !$this->repository->getDestroy($id) )
        {
            $message = "Deletion failed. Probably due to a system blip. Please try again.";
            Session::flash('status_code', 500 );
            Session::flash('message', $message);
            return Redirect::route('admin.'.$this->resource_route_name.'.index');
        }

        Session::flash('status_code', 200 );

        $title = strtoupper($title);
        $message = 'You successfully deleted the '.$this->table_type_singular.' "'.$title.'"!';
        Session::flash('message', $message);
        return Redirect::route('admin.'.$this->resource_route_name.'.index');
    }
592266
public function delete($id = null)
    {
        // If an ID is passed to the method, we will set the where clause to check the
        // ID to let developers to simply and quickly remove a single row from this
        // database without manually specifying the "where" clauses on the query.
        if (! is_null($id)) {
            $this->where($this->from.'.id', '=', $id);
        }

        return $this->connection->delete(
            $this->grammar->compileDelete($this), $this->cleanBindings(
                $this->grammar->prepareBindingsForDelete($this->bindings)
            )
        );
    }
999254
public function destroy($id)
    {
        try {
            $this->repository->delete($id);

            return $this->redirect('categories.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
21854
public function destroy($id)
    {
        $this->entriesRepository->delete($id, $this->resource);

        return response()->json(['status' => 'ok']);
    }
983731
public function deleteRow($id)
    {
        unset($this->rows[$id]);

        if (in_array($id, $this->specialRows['header'])) {
            unset($this->specialRows['header'][array_search($id, $this->specialRows['header'])]);
        }

        if (in_array($id, $this->specialRows['footer'])) {
            unset($this->specialRows['footer'][array_search($id, $this->specialRows['footer'])]);
        }

        if ($this->activeRow == $id) {
            end($this->rows);
            $this->activeRow = key($this->rows);
        }

        return $this;
    }
38380
public function destroy($id)
    {
        $this->model = $this->model->findOrFail($id);

        $this->runChecks('destroy', $this->model->toArray());

        return $this->model->delete();
    }
1202471
public function destroy($id)
    {
        try {
            return (bool) $this->db->from($this->table)
                    ->where($this->columns['id'])->eq($id)
                    ->delete();
        } catch (PDOException $e) {
            return false;
        }
    }
921106
public function destroy($id)
    {
        // Find the item
        $item = $this->findOrFail($id);

        // Delete row (this should trigger file attachment deletes as well)
        $item->delete();

        // As long as not an ajax request, go back to the parent directory of the referrer
        if (Request::ajax()) {
            return Response::json();
        } else {
            return Redirect::to(DecoyURL::relative('index'))
            ->with('success', $this->successMessage($item, 'deleted'));
        }
    }
1287791
public function delete($id)
    {
        $db = new DB();
        $result = $db->db()->delete(['db_name'=>__config()->auth->db_name, 'table'=>__config()->auth->db_table, 'wheres'=>['id ='."'{$id}'"]]);
        $db->db()->close();

        return $result;
    }
1306050
public function deletePost( $id ) {
        $response = $this->service->api( 'statuses/destroy/' . $id . '.json', 'POST' );

        return isset( $response['id'] ) && $response['id'] == $id;
    }
137929
public function deleteById($id)
	{
		$sql = "DELETE FROM `$this->tableName` WHERE `$this->pkColName` = :entityId ";

		$stmt = $this->pdo->prepare($sql);
		$stmt->bindParam(':entityId', intval($id), \PDO::PARAM_INT);
		$res = $stmt->execute();

		return ($res !== false && $stmt->rowCount() === 1);
	}
787403
public function delete($id) {
		$dt = $this->getDataTable();
		
		if (! $dt)
			return $this->createResponse($this->getNameManager()->getTableNames(), 401, "Tabels");
		
		return $this->createResponse([], 200, "{$this->getNameManager()->entityName}: No Delete");
	}
754741
public function delete($id = null)
    {
        // If an ID is passed to the method, we will set the where clause to check
        // the ID to allow developers to simply and quickly remove a single row
        // from their database without manually specifying the where clauses.
        if (!is_null($id)) {
            $this->where('id', '=', $id);
        }
        $this->compileWheres();

        return $this->query->delete()->run();
    }
558814
public function delete($id = null)
    {
        if (!is_null($id)) {
            $this->setId($id);
        }

        return $this->getDbGateway()->delete($this->getId());
    }
785466
public function deleteRecords($id)
    {
        if (is_array($id)) {
            $params['idlist'] = implode(';', $id);
        } else {
            $params['id'] = $id;
        }

        return $this->call('deleteRecords', $params);
    }
115885
public function delete(string $id)
    {
        $this->request->allowMethod(['post', 'delete']);
        $dblist = $this->Dblists->get($id);
        if ($this->Dblists->delete($dblist)) {
            $this->Flash->success('The database list has been deleted.');
        } else {
            $this->Flash->error('The database list could not be deleted. Please, try again.');
        }

        return $this->redirect(['action' => 'index']);
    }
781617
public static function destroy($id)
    {
        $table = self::getTableNameFromClass();

        self::getOne($id);

        $query = "DELETE FROM $table WHERE id = ".$id;

        try {
            Connection::db()->query($query);
            return true;
        } catch (Exception $e) {
            return false;
        }
    }