Remove the specified Upload from storage.

@param  int $id

@return JsonResponse
174182
public function destroy($id, IndexRequest $request)
    {
        $upload = $this->repository->find($id);
        if (empty($upload)) {
            return $this->sendError('Upload not found');
        }
        $this->repository->delete($id);

        return $this->sendResponse($upload, 'Upload deleted successfully.');
    }
404391
public function deleteAction($id)
    {
        $em = $this->getDoctrine()->getManager();
        $em->remove($this->getImage($id));
        $em->flush();

        return new Response();
    }
993535
public function destroy($id)
    {
        $find = $this->findResourceCallable($id);

        $delete = $this->deleteResourceCallable($id);

        $resource = new DeleteResource($this->serializer);

        return $this->addHeaders($resource->get($id, get_class($this->getDataModel()), $find, $delete));
    }
1257743
public function destroy($id)
    {
        $delete = $this->repo->delete($id);

        if ( ! $delete)
        {
            return $this->respondNotProcessable('Unable to delete the selected '.ucfirst($this->baseClass));
        }

        $message = $this->baseClass.' deleted successfully';

        return compact('message');
    }
462081
public function destroy($id)
    {
     	$package = Package::findOrfail($id);
     	$package->delete();
        return URL::to('package');
    }
49752
public static function destroy($id) 
    {
        try {
            $file = self::find($id);
            
            if($file->descendants()->exists()) {
                foreach($file->descendants()->where('type', '!=', 'folder')->get() as $descendant) {
                    
                    event(new FileWasDeleted([ // fire 'file deleted' event for each descendant
                        'file' => $descendant
                    ]));
                }
            }
            
            $file->delete($id);

            if($file->type != 'folder') {
                event(new FileWasDeleted([ // fire 'file deleted' event for file
                    'file' => $file
                ]));
            }
        }
        
        catch (Exception $e) {
            throw $e;
        }
    }
538189
public function destroy($id)
    {
        try {
            $this->content->destroy($id);
        } catch (Exception $e) {
            return $this->handleException($e, trans('soda::errors.delete', ['object' => trans('soda::terminology.content')]));
        }

        return redirect()->back()->with('info', trans('soda::messages.deleted', ['object' => trans('soda::terminology.content')]));
    }
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.');
    }
1048882
public function destroy($id)
    {
        $class = $this->model;

        return $class::destroy($id)
            ? ['success' => ucfirst($this->readableResourceType()) . ' removed successfully.']
            : ['error' => 'There was a problem removing the ' . $this->readableResourceType() . '.'];
    }
970056
public function destroy($id)
    {
        $user = $this->user->findOrFail($id);

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

        return response()->json(['status' => 'failed']);
    }
351496
public function assetsDelete($id)
    {
        $resource = '/assets/' . $id . '.json';

        // Create request
        $data = $this->auth->request('DELETE', $resource);

        return $data;
    }
809512
public function delete(int $id)
    {
        return self::$curl->post(self::DELETE.self::$access_token, json_encode([
                'tag' => [
                    'id' => $id,
                ],
            ]
        ));
    }
766600
public function remove($id) {
		if (! $this->connectionCheckStatus) {
			$this->addServer();
		}
		
		return $this->getClient()->delete($this->prepareId($id));
	}
1252159
public function destroy($id)
    {
        $this->authorize('delete-user-invitations');
        UserInvitation::destroy($id);

        // NOTE : this method trigger method "created" in UserInvitationObserver. Fire also and event to enable hooking.
//        event(new UserInvited($invitation));

        return Response::json(['deleted' => true ]);
    }
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';
        }
    }
197103
public function destroy(int $id, Request $request)
    {
        $storage = $request->get('storage', 'public');
        Attachment::find($id)->delete($storage);

        return response(200);
    }
744716
public function deleteShift($id)
    {
        list($response, $statusCode, $httpHeader) = $this->deleteShiftWithHttpInfo ($id);
        return $response; 
    }