/**
  * @param $projectId
  * @return array
  */
 public function getMembers($projectId)
 {
     if (count($this->repository->findWhere(['id' => $projectId]))) {
         return $this->repository->find($projectId)->members;
     }
     return ['error' => 'Project does not exists'];
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return $this->repository->findWhere(['owner_id' => \Authorizer::getResourceOwnerId()]);
     //return $this->repository->findWithOwnerAndMember(Authorizer::getResourceOwnerId());
     //return $this->repository->all();
     //return $this->repository->with(['client', 'user'])->all();
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return $this->repository->findWhere(['owner_id' => Authorizer::getResourceOwnerId()]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return $this->repository->findWhere(['owner_id' => \Authorizer::getResourceOwnerId()]);
     //return $this->service->getProject();
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $this->repository->with('owner');
     $this->repository->with('client');
     return $this->repository->findWhere(['owner_id' => Authorizer::getResourceOwnerId()]);
 }
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id, $noteId)
 {
     return $this->repository->findWhere(['project_id' => $id, 'id' => $noteId]);
 }