public function allOwner($limit) { $user_id = \Authorizer::getResourceOwnerId(); return $this->repository->findOwner($user_id, $limit); // $ids = $this->projectMemberRepository->projectsOfWhichIsMember($user_id); // return $this->repository->with(['client','owner'])->findWhereIn('id', $ids); }
/** * Display a listing of the resource. * * @return Response */ public function index(Request $request) { //return $this->repository->findWhere(['owner_id' => \Authorizer::getResourceOwnerId()]); //return $this->repository->findWithOwnerAndMember(\Authorizer::getResourceOwnerId()); return $this->repository->findOwner(\Authorizer::getResourceOwnerId(), $request->query->get('limit')); //return $this->repository->all(); //return $this->repository->with(['client', 'user'])->all(); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request) { try { //return $this->repository->findWithOwnerAndMember(\Authorizer::getResourceOwnerId()); return $this->repository->findOwner(\Authorizer::getResourceOwnerId(), $request->query->get('limit')); } catch (NoActiveAccessTokenException $e) { return $this->erroMsgm('Usuário não está logado.'); } catch (\Exception $e) { return $this->erroMsgm('Ocorreu um erro ao listar os projetos. Erro: ' . $e->getMessage()); } }
/** * Display a listing of the resource. * * @return Response */ public function index(Request $request) { #return $this->repository->hidden(['owner_id', 'client_id'])->with(['owner', 'client'])->all(); /*return $this->repository-> with(['client', 'tasks', 'notes', 'members'])-> all()->members()->where(['user_id' => Authorizer::getResourceOwnerId()]);*/ #return $this->service->index(); $rtrn = $this->repository->findOwner(Authorizer::getResourceOwnerId(), $request->query->get('limit')); #dd($rtrn); return $rtrn; }
public function findOwner($limit = null, $columns = array()) { $this->setPresenter(); return $this->repository->findOwner(Authorizer::getResourceOwnerId(), $limit, $columns); }
/** * Display a listing of the resource. * * @return Response */ public function index(Request $request) { return $this->repository->findOwner(\Authorizer::getResourceOwnerId(), $request->query->get('limit')); }