Code Duplication    Length = 16-16 lines in 2 locations

src/Http/Controllers/MasterZonaController.php 1 location

@@ 293-308 (lines=16) @@
290
     * @param  \App\MasterZona  $master-zona
291
     * @return \Illuminate\Http\Response
292
     */
293
    public function destroy($id)
294
    {
295
        $master_zona = $this->master_zona->findOrFail($id);
296
297
        if ($master_zona->delete()) {
298
            $response['message']    = 'Success';
299
            $response['success']    = true;
300
            $response['status']     = true;
301
        } else {
302
            $response['message']    = 'Failed';
303
            $response['success']    = false;
304
            $response['status']     = false;
305
        }
306
307
        return json_encode($response);
308
    }
309
}
310

src/Http/Controllers/ZonaController.php 1 location

@@ 408-423 (lines=16) @@
405
     * @param  \App\Zona  $zona
406
     * @return \Illuminate\Http\Response
407
     */
408
    public function destroy($id)
409
    {
410
        $zona = $this->zona->findOrFail($id);
411
412
        if ($zona->delete()) {
413
            $response['message']    = 'Success';
414
            $response['success']    = true;
415
            $response['status']     = true;
416
        } else {
417
            $response['message']    = 'Failed';
418
            $response['success']    = false;
419
            $response['status']     = false;
420
        }
421
422
        return json_encode($response);
423
    }
424
}
425