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.');
    }
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.');
    }
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.' ) ; }
Remove the specified Upload from storage.

@param  int $id

@return JsonResponse
Remove the specified Upload from storage .