public function createFile(array $data)
 {
     try {
         $this->filevalidator->with($data)->passesOrFail(ValidatorInterface::RULE_CREATE);
         $project = $this->projectRepository->skipPresenter()->find($data['project_id']);
         $projectFile = $project->files()->create($data);
         $this->storage->disk('local')->put($projectFile->getFileName(), $this->filesystem->get($data['file']));
         return ['error' => false, 'success' => true];
     } catch (ValidatorException $e) {
         return ['error' => true, 'message' => $e->getMessageBag()];
     }
 }
 public function checkProjectMember($projectId)
 {
     $userid = \Authorizer::getResourceOwnerId();
     return $this->repository->hasMember($projectId, $userid);
 }