| @@ 273-284 (lines=12) @@ | ||
| 270 | * @param \App\Sekolah $sekolah |
|
| 271 | * @return \Illuminate\Http\Response |
|
| 272 | */ |
|
| 273 | public function destroy($id) |
|
| 274 | { |
|
| 275 | $sekolah = $this->sekolah->findOrFail($id); |
|
| 276 | ||
| 277 | if ($sekolah->delete()) { |
|
| 278 | $response['status'] = true; |
|
| 279 | } else { |
|
| 280 | $response['status'] = false; |
|
| 281 | } |
|
| 282 | ||
| 283 | return json_encode($response); |
|
| 284 | } |
|
| 285 | } |
|
| 286 | ||
| @@ 277-288 (lines=12) @@ | ||
| 274 | * @param \App\Sekolah $sekolah |
|
| 275 | * @return \Illuminate\Http\Response |
|
| 276 | */ |
|
| 277 | public function destroy($id) |
|
| 278 | { |
|
| 279 | $prodi_sekolah = $this->prodi_sekolah->findOrFail($id); |
|
| 280 | ||
| 281 | if ($prodi_sekolah->delete()) { |
|
| 282 | $response['status'] = true; |
|
| 283 | } else { |
|
| 284 | $response['status'] = false; |
|
| 285 | } |
|
| 286 | ||
| 287 | return json_encode($response); |
|
| 288 | } |
|
| 289 | } |
|
| 290 | ||