/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { if (!$this->service->checkProjectPermissions($id)) { return ['error' => 'Access Forbidden']; } return $this->service->find($id); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { try { if ($this->service->checkProjectPermissions($id) == false) { return ['error' => 'Access Forbidden']; } $project = $this->service->find($id); return $project; //return $this->repository->find($id); } catch (ModelNotFoundException $e) { return ['error' => true, 'message' => 'Project not found']; } }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { return $this->service->find($id); }
/** * Display the specified resource. * * @param int $projectId * @param int $id * @return Response */ public function show($projectId, $id) { return $this->service->find($projectId, $id); }