/**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     if ($this->checkProjectPermission($id) == false) {
         return ['error' => 'Acesso negado ao projeto!'];
     }
     $this->repository->delete($id);
 }
 public function checkProjectMember($projectFileId)
 {
     $userId = \Authorizer::getResourceOwnerId();
     $projectId = $this->repository->skipPresenter()->find($projectFileId)->project_id;
     return $this->projectRepository->hasMember($projectId, $userId);
 }