| @@ 246-257 (lines=12) @@ | ||
| 243 | * @param \App\Sktm $sktm |
|
| 244 | * @return \Illuminate\Http\Response |
|
| 245 | */ |
|
| 246 | public function destroy($id) |
|
| 247 | { |
|
| 248 | $master_sktm = $this->master_sktm->findOrFail($id); |
|
| 249 | ||
| 250 | if ($master_sktm->delete()) { |
|
| 251 | $response['status'] = true; |
|
| 252 | } else { |
|
| 253 | $response['status'] = false; |
|
| 254 | } |
|
| 255 | ||
| 256 | return json_encode($response); |
|
| 257 | } |
|
| 258 | } |
|
| 259 | ||
| @@ 270-281 (lines=12) @@ | ||
| 267 | * @param \App\Sktm $sktm |
|
| 268 | * @return \Illuminate\Http\Response |
|
| 269 | */ |
|
| 270 | public function destroy($id) |
|
| 271 | { |
|
| 272 | $sktm = $this->sktm->findOrFail($id); |
|
| 273 | ||
| 274 | if ($sktm->delete()) { |
|
| 275 | $response['status'] = true; |
|
| 276 | } else { |
|
| 277 | $response['status'] = false; |
|
| 278 | } |
|
| 279 | ||
| 280 | return json_encode($response); |
|
| 281 | } |
|
| 282 | } |
|
| 283 | ||