equal
deleted
inserted
replaced
28 $paginator = $this->documentRepository->paginateAll(); |
28 $paginator = $this->documentRepository->paginateAll(); |
29 $res = $paginator->toArray(); |
29 $res = $paginator->toArray(); |
30 if(array_key_exists('data', $res)) { |
30 if(array_key_exists('data', $res)) { |
31 $documents = $res['data']; |
31 $documents = $res['data']; |
32 unset($res['data']); |
32 unset($res['data']); |
33 $res['documents'] = $this->documentRepository->resolveLexvo($documents); |
33 //$res['documents'] = $this->documentRepository->resolveLexvo($documents); |
34 } |
34 } |
35 return response()->json($res); |
35 return response()->json($res); |
36 } |
36 } |
37 |
37 |
38 /** |
38 /** |
63 * @return Response |
63 * @return Response |
64 */ |
64 */ |
65 public function show($id) |
65 public function show($id) |
66 { |
66 { |
67 $doc = $this->documentRepository->get($id); |
67 $doc = $this->documentRepository->get($id); |
68 $this->documentRepository->resolveLexvo([$doc,]); |
|
69 if(is_null($doc)) { |
68 if(is_null($doc)) { |
70 abort(404); |
69 abort(404); |
71 } |
70 } |
|
71 //$this->documentRepository->resolveLexvo([$doc,]); |
72 return response()->json(["document" => $doc]); |
72 return response()->json(["document" => $doc]); |
73 } |
73 } |
74 |
74 |
75 /** |
75 /** |
76 * Show the form for editing the specified resource. |
76 * Show the form for editing the specified resource. |