| @@ 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 | ||
| @@ 302-317 (lines=16) @@ | ||
| 299 | * @param \App\Sekolah $sekolah |
|
| 300 | * @return \Illuminate\Http\Response |
|
| 301 | */ |
|
| 302 | public function destroy($id) |
|
| 303 | { |
|
| 304 | $prodi_sekolah = $this->prodi_sekolah->findOrFail($id); |
|
| 305 | ||
| 306 | if ($prodi_sekolah->delete()) { |
|
| 307 | $response['message'] = 'Success'; |
|
| 308 | $response['success'] = true; |
|
| 309 | $response['status'] = true; |
|
| 310 | } else { |
|
| 311 | $response['message'] = 'Failed'; |
|
| 312 | $response['success'] = false; |
|
| 313 | $response['status'] = false; |
|
| 314 | } |
|
| 315 | ||
| 316 | return json_encode($response); |
|
| 317 | } |
|
| 318 | } |
|
| 319 | ||
| @@ 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 | ||