@@ -13,8 +13,8 @@ discard block |
||
13 | 13 | { |
14 | 14 | return response()->json( |
15 | 15 | $this->mainService |
16 | - ->findAll($this->translateFilters($request)) |
|
17 | - ->toArray($this->optionsToArrayIndex) |
|
16 | + ->findAll($this->translateFilters($request)) |
|
17 | + ->toArray($this->optionsToArrayIndex) |
|
18 | 18 | ); |
19 | 19 | } |
20 | 20 | |
@@ -22,8 +22,8 @@ discard block |
||
22 | 22 | { |
23 | 23 | return response()->json( |
24 | 24 | $this->mainService |
25 | - ->find($id) |
|
26 | - ->toArray($this->optionsToArrayShow) |
|
25 | + ->find($id) |
|
26 | + ->toArray($this->optionsToArrayShow) |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 | } |
@@ -9,8 +9,8 @@ |
||
9 | 9 | public function destroy($id) |
10 | 10 | { |
11 | 11 | $entity = $this->mainService |
12 | - ->remove($id) |
|
13 | - ->flush(); |
|
12 | + ->remove($id) |
|
13 | + ->flush(); |
|
14 | 14 | |
15 | 15 | return response()->json($entity->toArray($this->optionsToArrayDestroy)); |
16 | 16 | } |
@@ -11,17 +11,17 @@ |
||
11 | 11 | public function update(Request $request, $id) |
12 | 12 | { |
13 | 13 | $entity = $this->mainService |
14 | - ->update( |
|
14 | + ->update( |
|
15 | 15 | $id, |
16 | 16 | $this->filterRequest( |
17 | 17 | $request->json()->all(), |
18 | 18 | $this->mainService |
19 | - ->getMainRepository() |
|
20 | - ->createEntity() |
|
21 | - ->getOnlyUpdate() |
|
19 | + ->getMainRepository() |
|
20 | + ->createEntity() |
|
21 | + ->getOnlyUpdate() |
|
22 | 22 | ) |
23 | - ) |
|
24 | - ->flush(); |
|
23 | + ) |
|
24 | + ->flush(); |
|
25 | 25 | |
26 | 26 | return response()->json($entity->toArray($this->optionsToArrayUpdate)); |
27 | 27 | } |
@@ -11,16 +11,16 @@ |
||
11 | 11 | public function store(Request $request) |
12 | 12 | { |
13 | 13 | $entity = $this->mainService |
14 | - ->store( |
|
15 | - $this->filterRequest( |
|
16 | - $request->json()->all(), |
|
14 | + ->store( |
|
15 | + $this->filterRequest( |
|
16 | + $request->json()->all(), |
|
17 | 17 | $this->mainService |
18 | - ->getMainRepository() |
|
19 | - ->createEntity() |
|
20 | - ->getOnlyStore() |
|
18 | + ->getMainRepository() |
|
19 | + ->createEntity() |
|
20 | + ->getOnlyStore() |
|
21 | 21 | ) |
22 | - ) |
|
23 | - ->flush(); |
|
22 | + ) |
|
23 | + ->flush(); |
|
24 | 24 | |
25 | 25 | return response()->json($entity->toArray($this->optionsToArrayStore)); |
26 | 26 | } |