| @@ 244-255 (lines=12) @@ | ||
| 241 | * @param \App\Nilai $nilai |
|
| 242 | * @return \Illuminate\Http\Response |
|
| 243 | */ |
|
| 244 | public function destroy($id) |
|
| 245 | { |
|
| 246 | $nilai = $this->nilai->findOrFail($id); |
|
| 247 | ||
| 248 | if ($nilai->delete()) { |
|
| 249 | $response['status'] = true; |
|
| 250 | } else { |
|
| 251 | $response['status'] = false; |
|
| 252 | } |
|
| 253 | ||
| 254 | return json_encode($response); |
|
| 255 | } |
|
| 256 | } |
|
| 257 | ||
| @@ 260-271 (lines=12) @@ | ||
| 257 | * @param \App\Nilai $nilai |
|
| 258 | * @return \Illuminate\Http\Response |
|
| 259 | */ |
|
| 260 | public function destroy($id) |
|
| 261 | { |
|
| 262 | $nilai = $this->nilai->findOrFail($id); |
|
| 263 | ||
| 264 | if ($nilai->delete()) { |
|
| 265 | $response['status'] = true; |
|
| 266 | } else { |
|
| 267 | $response['status'] = false; |
|
| 268 | } |
|
| 269 | ||
| 270 | return json_encode($response); |
|
| 271 | } |
|
| 272 | } |
|
| 273 | ||