Deletes the given observer for the current user
@param string $id
@return int
422977
public function user_delete($id): int
  {
    if ( property_exists($this, 'user') && $this->check() ){
      return $this->db->delete('bbn_observers', ['id' => $id, 'id_user' => $this->user]);
    }
    return 0;
  }
1192511
public function deleteFromFlexiBee($id = null)
    {
        if (is_null($id)) {
            $id = $this->getMyKey();
        }

        $this->performRequest($this->getEvidenceUrl().'/'.self::urlizeId($id),
            'DELETE');
        return $this->lastResponseCode == 200;
    }
970056
public function destroy($id)
    {
        $user = $this->user->findOrFail($id);

        if($user->delete()) return response()->json(['status' => 'ok']);

        return response()->json(['status' => 'failed']);
    }
609028
public function delete($id = null) {
        $user = $this->Users->get($id);
        if ($this->request->is(['patch', 'post', 'put'])) {
            if ($this->Users->delete($user)) {
                $this->Flash->success(__('The user has been deleted.'));
            } else {
                $this->Flash->error(__('The user could not be deleted. Please, try again.'));
            }
            return $this->redirect(['action' => 'index']);
        }
        $this->set(compact('user'));
    }
1077235
public function destroy($id)
      {
        $user = $this->users->findOrFail($id);
        User::destroy($id);
        return \Redirect::route('admin.users.index', [
          ])->withMessage(trans('acl::user.users-controller-successfully_deleted'));
        }
415930
public function delete($id = null): bool
	{
		$instance = $this->read($id);

		return $instance->delete();
	}
1230929
public function deleteAction($id)
    {
        $delete = function ($id) {
            $this->getManager()->delete($id);
        };
        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
387210
public function delete($id)
    {
        if ($record = $this->find($id)) {
            if ($this->preDelete($id, $record)) {
                return $this->postDelete($id, $record->delete(), $record);
            }
        } else {
            $this->throwModelNotFoundException($id);
        }
    }
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");
	}
1286073
public function deleteById($id)
    {
        $read = NotificationsStackRead::where([
                    'stack_id' => $id,
                    'user_id'  => user()->id
                ])->first();
        if (!is_null($read)) {
            return $read->delete();
        }
        return false;
    }
962429
public function destroy($id)
    {
     	$user_setting = User_setting::findOrfail($id);
     	$user_setting->delete();
        return URL::to('user_setting');
    }
616107
public static function destroy($id)
    {
        if (self::confirmIdExists($id)) {
            return self::doDelete($id); 
        } else { 
            throw new Exception('Now rows found with ID '.$id.' in the database, it may have been already deleted'); 
        }
    }
1201101
public function delete($id)
    {
        $obj = $this->find($id);
        Event::fire('repository.deleting', [$obj]);
        return $obj->delete();
    }
164583
public function delete($id = null)
    {
        if ($this->read_only) {
            throw new Exception(['Model is read-only and cannot be deleted']);
        }

        if ($id == $this->id) {
            $id = null;
        }

        return $this->atomic(function () use ($id) {
            if ($id) {
                $c = clone $this;
                $c->load($id)->delete();

                return $this;
            } elseif ($this->loaded()) {
                if ($this->hook('beforeDelete', [$this->id]) === false) {
                    return $this;
                }
                $this->persistence->delete($this, $this->id);
                $this->hook('afterDelete', [$this->id]);
                $this->unload();

                return $this;
            } else {
                throw new Exception(['No active record is set, unable to delete.']);
            }
        });
    }
846748
public function destroy($id)
    {
        $user = $this->userRepo->getById($id);

        if (!empty($user)) {
            $this->authorize('delete', $user);
            $user->delete();
            return $this->respondWithSimpleSuccess(['success' => true]);
        }
        return $this->respondNotFound();
    }
993792
public function deleteAction($id)
    {
        /** @var PostInterface $post */
        $post = $this->get('opifer.form.post_manager')->getRepository()->find($id);

        if (!$post) {
            return $this->createNotFoundException();
        }
        
        $form = $post->getForm();

        $em = $this->getDoctrine()->getManager();
        $em->remove($post);
        $em->flush();

        return $this->redirectToRoute('opifer_form_post_index', ['formId' => $form->getId()]);
    }
1248762
public function destroy($id)
    {
        $deleted = $this->repository->delete($id);

        if (request()->wantsJson()) {
            return response()->json([
                'message' => 'Attendance deleted.',
                'deleted' => $deleted,
            ]);
        }

        return redirect()->back()->with('message', 'Attendance deleted.');
    }