| @@ 209-224 (lines=16) @@ | ||
| 206 | * @param \App\JenisSekolah $jenis_sekolah |
|
| 207 | * @return \Illuminate\Http\Response |
|
| 208 | */ |
|
| 209 | public function destroy($id) |
|
| 210 | { |
|
| 211 | $jenis_sekolah = $this->jenis_sekolah->findOrFail($id); |
|
| 212 | ||
| 213 | if ($jenis_sekolah->delete()) { |
|
| 214 | $response['message'] = 'Success'; |
|
| 215 | $response['success'] = true; |
|
| 216 | $response['status'] = true; |
|
| 217 | } else { |
|
| 218 | $response['message'] = 'Failed'; |
|
| 219 | $response['success'] = false; |
|
| 220 | $response['status'] = false; |
|
| 221 | } |
|
| 222 | ||
| 223 | return json_encode($response); |
|
| 224 | } |
|
| 225 | } |
|
| 226 | ||
| @@ 331-346 (lines=16) @@ | ||
| 328 | * @param \App\Sekolah $sekolah |
|
| 329 | * @return \Illuminate\Http\Response |
|
| 330 | */ |
|
| 331 | public function destroy($id) |
|
| 332 | { |
|
| 333 | $prodi_sekolah = $this->prodi_sekolah->findOrFail($id); |
|
| 334 | ||
| 335 | if ($prodi_sekolah->delete()) { |
|
| 336 | $response['message'] = 'Success'; |
|
| 337 | $response['success'] = true; |
|
| 338 | $response['status'] = true; |
|
| 339 | } else { |
|
| 340 | $response['message'] = 'Failed'; |
|
| 341 | $response['success'] = false; |
|
| 342 | $response['status'] = false; |
|
| 343 | } |
|
| 344 | ||
| 345 | return json_encode($response); |
|
| 346 | } |
|
| 347 | } |
|
| 348 | ||
| @@ 364-379 (lines=16) @@ | ||
| 361 | * @param \App\Sekolah $sekolah |
|
| 362 | * @return \Illuminate\Http\Response |
|
| 363 | */ |
|
| 364 | public function destroy($id) |
|
| 365 | { |
|
| 366 | $sekolah = $this->sekolah->findOrFail($id); |
|
| 367 | ||
| 368 | if ($sekolah->delete()) { |
|
| 369 | $response['message'] = 'Success'; |
|
| 370 | $response['success'] = true; |
|
| 371 | $response['status'] = true; |
|
| 372 | } else { |
|
| 373 | $response['message'] = 'Failed'; |
|
| 374 | $response['success'] = false; |
|
| 375 | $response['status'] = false; |
|
| 376 | } |
|
| 377 | ||
| 378 | return json_encode($response); |
|
| 379 | } |
|
| 380 | } |
|
| 381 | ||