| @@ 164-174 (lines=11) @@ | ||
| 161 | * @return \Illuminate\Http\Response |
|
| 162 | */ |
|
| 163 | ||
| 164 | public function edit($id) |
|
| 165 | { |
|
| 166 | $master_sktm = $this->master_sktm->findOrFail($id); |
|
| 167 | ||
| 168 | array_set($master_sktm->user, 'label', $master_sktm->user->name); |
|
| 169 | ||
| 170 | $response['master_sktm'] = $master_sktm; |
|
| 171 | $response['user'] = $master_sktm->user; |
|
| 172 | $response['status'] = true; |
|
| 173 | ||
| 174 | return response()->json($response); |
|
| 175 | } |
|
| 176 | ||
| 177 | /** |
|
| @@ 162-172 (lines=11) @@ | ||
| 159 | * @param \Illuminate\Http\Request $request |
|
| 160 | * @return \Illuminate\Http\Response |
|
| 161 | */ |
|
| 162 | public function show($id) |
|
| 163 | { |
|
| 164 | $sktm = $this->sktm->findOrFail($id); |
|
| 165 | ||
| 166 | $response['user'] = $sktm->user; |
|
| 167 | $response['master_sktm'] = $sktm->master_sktm; |
|
| 168 | $response['sktm'] = $sktm; |
|
| 169 | $response['status'] = true; |
|
| 170 | ||
| 171 | return response()->json($response); |
|
| 172 | } |
|
| 173 | ||
| 174 | /** |
|
| 175 | * Show the form for editing the specified resource. |
|