Remove the specified resource from storage.

@param  int  $id
@return \Illuminate\Http\Response
160460
public function destroy(Request $request, $id)
    {
        $this->model = $this->model->findOrFail($id);

        $deleted = $this->model->delete();

        $title = ucfirst(trans('livecms::livecms.destroysuccess'));
        $message = ucfirst(trans('livecms::livecms.destroysuccessmessage', ['model' => trans('livecms::livecms.'.$this->base)]));
        alert()->success($message, $title);

        if ($deleted) {
            return $this->redirection();
        }
    }
943581
public function delete(string $id)
    {
        $url = $this->url.'/'.$id;

        return $this->curl->delete($url);
    }
1176423
public function delete($id) {
        $this->checkPermissions('delete');
        
        return $this->client->deleteData($this->resourceName . '/' . $id);
    }
1077787
public function deleteAction($id)
    {
        $delete = $this->getUserManager()->delete();
        $view = $this->responseDelete($id, $delete);

        return $this->handleView($view);
    }
799304
public function destroyUpdate($id)
    {
        return $this->send($this->getHttp()->post($this->url.'updates/'.$id.'/destroy.json'));
    }
985275
public function destroy($id)
    {
        $feed = $this->feed->findOrFail($id);

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

        return response()->json(['status' => 'failed']);
    }
970056
public function destroy($id)
    {
        $user = $this->user->findOrFail($id);

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

        return response()->json(['status' => 'failed']);
    }
626899
public function delete($id) {
        return $this->request("DELETE", self::URL_ORDERS . $id . "/", $api_key = $this->culqi->api_key);
    }
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'));
        }
    }
1258667
public function destroy($id)
    {
        // get role by id
        $role = Role::find($id);

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

        // delete role
        $deleteRole = $role->delete();

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

        return response()->json(null, 204);
    }
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');
    }
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.');
    }
826091
public function remove($id) {
		$event  = $this->getProfiler()->startDelete('Remove: ' . $id);
		$result = $this->getBackend()->remove($id);
		
		if ($result === false) {
			$event->stopError();
		} else {
			$event->stopSuccess();
		}
		
		return $result;
	}
8343
public function delete($id)
    {
        if ($id instanceof DocumentInterface) {
            $id = $id->getId();
        }

        $path = $this->getPathForDocument($id);

        return unlink($path);
    }
701352
public function destroy($id)
    {
        try
        {
            $this->groups->delete($id);

            return Redirect::route('cpanel.groups.index')
                ->with('success', Lang::get('cpanel::groups.delete_success'));
        }
        catch (GroupNotFoundException $e)
        {
            return Redirect::back()->with('error', $e->getMessage());
        }
    }
1032404
public function destroy($id)
    {
        try {
            $file = $this->fileDB->getById($id);
            $this->fileDB->deleteFile($file);
            return 'File deleted';
        } catch (\Exception $e) {
            \Log::error($e);
            $this->flashMessage('delete-failed','danger');
            return 'Error: File not deleted';
        }
    }
1117474
public function remove($id)
    {
        if (false === $this->_cache->delete($id)) {
            return $this->_onError('remove');
        }

        return true;
    }