| @@ 380-395 (lines=16) @@ | ||
| 377 | * @param \App\Sekolah $sekolah |
|
| 378 | * @return \Illuminate\Http\Response |
|
| 379 | */ |
|
| 380 | public function destroy($id) |
|
| 381 | { |
|
| 382 | $sekolah = $this->sekolah->findOrFail($id); |
|
| 383 | ||
| 384 | if ($sekolah->delete()) { |
|
| 385 | $response['message'] = 'Success'; |
|
| 386 | $response['success'] = true; |
|
| 387 | $response['status'] = true; |
|
| 388 | } else { |
|
| 389 | $response['message'] = 'Failed'; |
|
| 390 | $response['success'] = false; |
|
| 391 | $response['status'] = false; |
|
| 392 | } |
|
| 393 | ||
| 394 | return json_encode($response); |
|
| 395 | } |
|
| 396 | } |
|
| 397 | ||
| @@ 206-221 (lines=16) @@ | ||
| 203 | * @param \App\JenisSekolah $jenis_sekolah |
|
| 204 | * @return \Illuminate\Http\Response |
|
| 205 | */ |
|
| 206 | public function destroy($id) |
|
| 207 | { |
|
| 208 | $jenis_sekolah = $this->jenis_sekolah->findOrFail($id); |
|
| 209 | ||
| 210 | if ($jenis_sekolah->delete()) { |
|
| 211 | $response['message'] = 'Success'; |
|
| 212 | $response['success'] = true; |
|
| 213 | $response['status'] = true; |
|
| 214 | } else { |
|
| 215 | $response['message'] = 'Failed'; |
|
| 216 | $response['success'] = false; |
|
| 217 | $response['status'] = false; |
|
| 218 | } |
|
| 219 | ||
| 220 | return json_encode($response); |
|
| 221 | } |
|
| 222 | } |
|
| 223 | ||
| @@ 327-342 (lines=16) @@ | ||
| 324 | * @param \App\Sekolah $sekolah |
|
| 325 | * @return \Illuminate\Http\Response |
|
| 326 | */ |
|
| 327 | public function destroy($id) |
|
| 328 | { |
|
| 329 | $prodi_sekolah = $this->prodi_sekolah->findOrFail($id); |
|
| 330 | ||
| 331 | if ($prodi_sekolah->delete()) { |
|
| 332 | $response['message'] = 'Success'; |
|
| 333 | $response['success'] = true; |
|
| 334 | $response['status'] = true; |
|
| 335 | } else { |
|
| 336 | $response['message'] = 'Failed'; |
|
| 337 | $response['success'] = false; |
|
| 338 | $response['status'] = false; |
|
| 339 | } |
|
| 340 | ||
| 341 | return json_encode($response); |
|
| 342 | } |
|
| 343 | } |
|
| 344 | ||