| @@ 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 | ||
| @@ 301-312 (lines=12) @@ | ||
| 298 | * @param \App\Zona $zona |
|
| 299 | * @return \Illuminate\Http\Response |
|
| 300 | */ |
|
| 301 | public function destroy($id) |
|
| 302 | { |
|
| 303 | $zona = $this->zona->findOrFail($id); |
|
| 304 | ||
| 305 | if ($zona->delete()) { |
|
| 306 | $response['status'] = true; |
|
| 307 | } else { |
|
| 308 | $response['status'] = false; |
|
| 309 | } |
|
| 310 | ||
| 311 | return json_encode($response); |
|
| 312 | } |
|
| 313 | } |
|
| 314 | ||