Code Duplication    Length = 16-16 lines in 2 locations

src/Http/Controllers/MasterZonaController.php 1 location

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

src/Http/Controllers/ZonaController.php 1 location

@@ 329-344 (lines=16) @@
326
     * @param  \App\Zona  $zona
327
     * @return \Illuminate\Http\Response
328
     */
329
    public function destroy($id)
330
    {
331
        $zona = $this->zona->findOrFail($id);
332
333
        if ($zona->delete()) {
334
            $response['message']    = 'Success';
335
            $response['success']    = true;
336
            $response['status']     = true;
337
        } else {
338
            $response['message']    = 'Failed';
339
            $response['success']    = false;
340
            $response['status']     = false;
341
        }
342
343
        return json_encode($response);
344
    }
345
}
346