| @@ 252-263 (lines=12) @@ | ||
| 249 | * @param \App\Zona $zona |
|
| 250 | * @return \Illuminate\Http\Response |
|
| 251 | */ |
|
| 252 | public function destroy($id) |
|
| 253 | { |
|
| 254 | $master_zona = $this->master_zona->findOrFail($id); |
|
| 255 | ||
| 256 | if ($master_zona->delete()) { |
|
| 257 | $response['status'] = true; |
|
| 258 | } else { |
|
| 259 | $response['status'] = false; |
|
| 260 | } |
|
| 261 | ||
| 262 | return json_encode($response); |
|
| 263 | } |
|
| 264 | } |
|
| 265 | ||
| @@ 313-324 (lines=12) @@ | ||
| 310 | * @param \App\Zona $zona |
|
| 311 | * @return \Illuminate\Http\Response |
|
| 312 | */ |
|
| 313 | public function destroy($id) |
|
| 314 | { |
|
| 315 | $zona = $this->zona->findOrFail($id); |
|
| 316 | ||
| 317 | if ($zona->delete()) { |
|
| 318 | $response['status'] = true; |
|
| 319 | } else { |
|
| 320 | $response['status'] = false; |
|
| 321 | } |
|
| 322 | ||
| 323 | return json_encode($response); |
|
| 324 | } |
|
| 325 | } |
|
| 326 | ||