/**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     if (!$this->service->checkProjectOwner($id)) {
         return $this->erroMsgm("O usuário não é owner desse projeto");
     }
     $this->service->delete($id);
     return ['error' => false, 'Arquivo deletado com sucesso'];
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @param $idFile
  * @return Response
  */
 public function destroy($id, $idFile)
 {
     try {
         if ($this->projectService->checkProjectPermissions($id) == false) {
             return ['error' => 'Access Forbidden'];
         }
         $this->service->delete($idFile);
         return ['error' => false, 'message' => 'Store file deleted'];
     } catch (ModelNotFoundException $ex) {
         return ['error' => true, 'message' => 'Store file error'];
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id, $idFile)
 {
     //$this->repository->delete($idFile);
     /*
     //if($this->service->checkProjectPermissions($id) == false){
     if($this->service->checkProjectOwner($id) == false){
         return ['error' => 'Access Forbidden'];
     }
     
     //return $this->service->delete($id);
     */
     $this->service->delete($idFile);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $project = $this->repository->find($id);
     if ($project) {
         $files = $this->repository->skipPresenter()->find($id)->files;
         foreach ($files as $file) {
             $this->fileService->delete($id, $file->id);
         }
         if ($this->repository->delete($id)) {
             return ['success' => true];
         } else {
             return ['success' => false];
         }
     } else {
         return ['success' => false, 'msg' => "Project not found!"];
     }
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id, $idFile)
 {
     $this->service->delete($idFile);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($projectId, $id)
 {
     $this->service->delete($id);
     return ['error' => false, 'Arquivo deletado com sucesso'];
 }
 public function destroy($file_id)
 {
     return $this->service->delete($file_id);
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param int $projectId
  * @param int $fileId
  * @return Response
  * @internal param int $id
  */
 public function destroy($projectId, $fileId)
 {
     return $this->service->delete($projectId, $fileId);
 }