| @@ 241-252 (lines=12) @@ | ||
| 238 | * @param \App\Sktm $sktm |
|
| 239 | * @return \Illuminate\Http\Response |
|
| 240 | */ |
|
| 241 | public function destroy($id) |
|
| 242 | { |
|
| 243 | $master_sktm = $this->master_sktm->findOrFail($id); |
|
| 244 | ||
| 245 | if ($master_sktm->delete()) { |
|
| 246 | $response['status'] = true; |
|
| 247 | } else { |
|
| 248 | $response['status'] = false; |
|
| 249 | } |
|
| 250 | ||
| 251 | return json_encode($response); |
|
| 252 | } |
|
| 253 | } |
|
| 254 | ||
| @@ 264-275 (lines=12) @@ | ||
| 261 | * @param \App\Sktm $sktm |
|
| 262 | * @return \Illuminate\Http\Response |
|
| 263 | */ |
|
| 264 | public function destroy($id) |
|
| 265 | { |
|
| 266 | $sktm = $this->sktm->findOrFail($id); |
|
| 267 | ||
| 268 | if ($sktm->delete()) { |
|
| 269 | $response['status'] = true; |
|
| 270 | } else { |
|
| 271 | $response['status'] = false; |
|
| 272 | } |
|
| 273 | ||
| 274 | return json_encode($response); |
|
| 275 | } |
|
| 276 | } |
|
| 277 | ||