Esempio n. 1
0
 /**
  * Display a listing of the resource, matching the passed search parameters.
  *
  * @param $projectUuid
  * @return \Illuminate\Support\Facades\Response
  * @throws Exception
  */
 public function search($projectUuid)
 {
     try {
         $project = $this->projectRepository->findByUuid($projectUuid, [], ['id']);
         if (is_null($project)) {
             return $this->errorNotFound(trans('exceptions.projectNotFound'));
         }
         $notes = $this->noteService->getByProjectAndSearch($project, $this->request->get('searchvalues'), ['replies']);
         return $this->respondWithCollection($notes, new NoteTransformer());
     } catch (Exception $e) {
         throw $e;
         return $this->errorInternalError(trans('exceptions.errorWhileFetchinNotes'));
     }
 }