@@ 54-60 (lines=7) @@ | ||
51 | * @param null $resourceKey |
|
52 | * @return \Illuminate\Http\JsonResponse |
|
53 | */ |
|
54 | protected function respondWithItem($item, $callback = null, $resourceKey = null) |
|
55 | { |
|
56 | $rootScope = $this->fractal |
|
57 | ->item($item, $callback, $resourceKey); |
|
58 | ||
59 | return $this->respondWithArray($rootScope->toArray()); |
|
60 | } |
|
61 | ||
62 | ||
63 | /** |
@@ 99-105 (lines=7) @@ | ||
96 | * @param null $resourceKey |
|
97 | * @return \Illuminate\Http\JsonResponse |
|
98 | */ |
|
99 | protected function respondWithItemCreated($item, $callback = null, $resourceKey = null) |
|
100 | { |
|
101 | $this->setStatusCode(201); |
|
102 | $rootScope = $this->fractal->item($item, $callback, $resourceKey); |
|
103 | ||
104 | return $this->respondWithArray($rootScope->toArray()); |
|
105 | } |
|
106 | ||
107 | /** |
|
108 | * Returns a json response that contains the specified collection |