Destroy the scheduler.

@param  integer  $id
@return \Illuminate\Http\Response
501693
public function destroy($id)
    {
        $scheduler = Scheduler::findOrFail($id);

        $scheduler->history()->delete();
        $scheduler->delete();

        return redirect(route('eyewitness.dashboard').'#scheduler')->withSuccess('The scheduler has been deleted.');
    }
584588
public function destroy($id)
    {
        $item = LBSM_item::findOrFail($id);
        $item->delete();
        return redirect()->back();
    }
358265
public function destroy($id)
    {
        $this->roles->findOrFail($id)->delete();
        return \Redirect::route('admin.roles.index', [
         ])->withMessage(trans('acl::role.roles-controller-successfully_deleted'));
    }
992311
public function destroy($id)
	{
		$tableName = $this->db->parseField($this->tableName);
		$sessionIDField = $this->db->parseField('session_id');
		return $this->db->execute(<<<SQL
delete from {$tableName} where {$sessionIDField} = %s
SQL
,array($id));
	}
503887
public function destroy($id)
    {
        $image = $this->repository->find($id);

        if (is_file(storage_path($image->location))) {
            Storage::delete($image->location);
        } else {
            Storage::disk(Config::get('cms.storage-location', 'local'))->delete($image->location);
        }

        if (empty($image)) {
            Cms::notification('Image not found', 'warning');

            return redirect(route($this->routeBase.'.images.index'));
        }

        $image->forgetCache();
        $image->delete();

        Cms::notification('Image deleted successfully.', 'success');

        return redirect(route($this->routeBase.'.images.index'));
    }
669315
public function destroy($id)
    {
        $product = Product::find($id);
        $product->delete();
        return JsonResponse::create(null, 204);
    }
1039674
public function destroy($id)
    {
        // get permission by id
        $permission = Permission::find($id);

        if (!$permission) {
            return response()->json(null, 404);
        }

        // delete permission
        $deletePermission = $permission->delete();

        if (!$deletePermission) {
            return response()->json(null, 500); // @codeCoverageIgnore
        }

        return response()->json(null, 204);
    }
999254
public function destroy($id)
    {
        try {
            $this->repository->delete($id);

            return $this->redirect('categories.index');
        } catch (ModelNotFoundException $e) {
            return $this->redirectNotFound();
        }
    }
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'));
        }
    }
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');
    }
1021102
public function destroy($id)
    {
        return $this->app['db']
            ->delete(self::TABLENAME)
            ->where('id', $id)
            ->execute() instanceof PDOStatement;
    }
951418
public function destroy($id)
    {
        $redirect = $this->redirect->findOrFail($id);

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

        return response()->json(['status' => 'failed']);
    }
1096449
public function destroy($id)
    {
        $tag = $this->model->findOrFail($id);
        $tag->delete();
        flash()->success('Se ha eliminado el Tag');

        return redirect()->to('backend/blog-tags');
    }
1074785
public function destroy($id)
    {
        $queue = Queue::findOrFail($id);

        $queue->history()->delete();
        $queue->delete();

        return redirect(route('eyewitness.dashboard').'#queue')->withSuccess('The queue has been deleted.');
    }
418853
public function destroy(int $id)
    {
        try {
            $address = Auth::user()->findAddress($id);
        } catch(\Illuminate\Database\Eloquent\ModelNotFoundException $e) {
            return $this->respondsWithError(trans('address.errors.model_not_found'));
        }

        $address->delete();

        return $this->respondsWithSuccess('', route('addressBook.index'));
    }
1328003
public function destroy($id)
    {
     	$feature = Feature::findOrfail($id);
     	$feature->delete();
        return URL::to('feature');
    }
102503
public function destroy($id)
	{
		$level = "danger";
		$message = " You are not permitted to destroy user objects";

		if ( Shinobi::can ( config('watchtower.acl.user.destroy', false) ) ) {
			$this->model::destroy($id);
			$level = "warning";
			$message = "<i class='fa fa-check-square-o fa-1x'></i> Success! User deleted.";
		}

		return redirect()->route( config('watchtower.route.as') . 'user.index')
					->with( ['flash' => ['message' => $message, 'level' =>  $level] ] );
	}