/**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id, $noteId)
 {
     $result = $this->repository->findWhere(['project_id' => $id, 'id' => $noteId]);
     $result = ['data' => $result[0]];
     //        if(isset($result['data']) && count($result['data']) == 1){
     //            $result = [
     //                'data' => $result['data'][0]
     //            ];
     //        };
     return $result;
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return $this->repository->findWhere(['owner_id' => \Authorizer::getResourceOwnerId()]);
 }
 public function index()
 {
     return $this->repository->findWhere(['owner_id' => $this->userId]);
 }
 public function show($id, $noteId)
 {
     return $this->repository->findWhere(['project_id' => $id, 'id' => $noteId]);
 }